# 8Iԥ,~쭔~Olo ~4~ ~HvIh%<= 쭔A 35150832#`aqYIOf ~ ~ح0ȡdl0<~P*t   Htt !"#$%&l0\~|]wt8'b(t)<*+,-./012345l06789:;<=>(Ȕ`Δ :H?I  ?@ABCDEFGHIqt4(Г$8͔%,   t$ hXr~ l~wė00~`tt 3[ ~ 4\]^! iRlR|QiRxQQJdRKQLdRYRZiRyRR[R\]RRRR^(R!@R XRR\QR,RRQ@QQlRhR\TW\tH--lx0'DanB 2002. Transfer ws version 3.08'Hf=,caretptt)ncenterer wherefrKeysWherePGlcid0  Untypey KPasterm$lfmKeys_def_German $DCutKeysXDrawKeyX fmKeys_defKeys_Germano1CMDKBDCopy, ClearMouseDownTxio0  g (i11tno)0 L< in 'stream' mode each object's length is also suppliedL0( il1/W[1+p[;1];0]-0,+\1l10` end} crtcnl ,lEİ켔Tŕ8 ƕT,ƕ˕|$ +  T” |ɕ\GBzD,)lɕ~ ѕ”@4T danb 2003 change representation4$D t((^\m)^\m)/t $  listarg[7] ,jerror r/'not in package',(q <zc  ""#$%&'()*+,-./0123477789:;<=>?@ABCDEFGHIKKLMNOPQRSTUVWXYZ[\]^_`abcdefgiijklmnopqrstuvwxy [($rn Pval p;io;b$L|,D\I |hL0D{XfrID'.xsw' file extention0$L (0vaLue)W81Ő$L,"d'4F`ӕ ӕ ٕ   $ ɕ >ɕ<p|D̕~8= Е䇕 `,Dו ; !"#܀$p%ԕ&'h<((Ը)\**E+X/,ו-•.P.H:/0x123ڕ345(67HdkNN'F'fx(3,M)(M'F'),(MEXP),(M8,EXP)'Nii+1'H,`'ĕ䯕;,t\ D ̏     s$ tϕM 7TI`XΕ,1ܞԕ|dB+0DH0ҕ0tCٕȜ:\ Txƕ܄X?   D   !L!•""d#`Օ$8 % %ؕ%&&'G()*T+8,0ѕ,<ٕ-{-?-T.ԕ/쨕01X;1{112ࣕ344pD Funtions; we use cr since it's the only standardD ̽ (2=fn)mat xX97X96X97 T $ U U( T),( lup T) $0[ insert room for new string0 ,file ncreate r D /range=start[,end] component range affectedD4U fnbout fn remove {} brackets4DT(file1)29 should we use the same filename?DCopyright Milinta inc 1999+ You are granted a licence to use this code provided it is for private use and the code is not modified. Contact support@milinta.com for details or report problems.e$t(repcpt1fsz)no$t,”֕,L $ؕرBt`!t8| /lock= file lock to use8,Tx”0@”<ɕP8 error ((cn)+/r)/'not in package'88 o_r_o_({ (inWs0file)37(8 9@ -)  !"#$%((()*+,-./1123456789:;<=>? 8~ fntfnobJ($ danb 2000 validate id( 0Zfn(t[0],s)fn $ r(Pchk p)1n $ okPchk p;io 4` r1+/bp[;0] n sanity checks4 @_ rngarg[2 3] tt2001 - Version 3 This workspace is used to transfer workspaces to/from host files. This be can useful when taking backups or going back to a previous incompatible version of an APL. Because it can apply some code translation it can also be used to go between APLs. It can be used stand alone for most PC APLs but for some mainframe APLs this method assumes you have access to some transfer program like PC108 for the PC. For example, TSO users need TSIO access (for SAM) and corresponding transfer programs. The programs known so far reside in variables with names resembling their environment. For SAM look at the objects and reassign 'filefns' to suit best your environment if necessary. SIMPLEST USAGE - To send to the host: )xload YOURWS )pcopy [lib] XFRPC (this workspace) namelist xfrto 'tohost\filename' 'namelist' can be (nl 2 3) or all, a utility fn to return all non transfer objects. - To retrieve the objects in a file on the host: )load [libno] XFRPC (this workspace) xfrfrom 'hostpath\filename' ADVANCED USAGE There are several switches. For example, if you want to transfer a file (ex: 'MFfile') instead of the current workspace, use switch 'file': xfrto 'tohost\filename /file=MFfile' local file name format varies but use \ instead of / for Unix pathnames to avoid conflicts with switches' delimiter. To transfer specific components use xfrto 'localfile /file=myfile /range=3,45' cpts 3 to 45 The access matrix is always transfered unless access is restricted. If a lock is required add the switch /lock. To retrieve a file do xfrfrom 'hostpath\filename /file=myfile' possibly adding switches /range and /noam if needed. The file will be created if it does not already exist. New items will be appended. Note that you must use the /f switch if it's a file even though the extention is .x?f otherwise all the components will be defined in the workspace in variables named something like CPTxxx. To replace objects or components use the /replace switch. If you only wish to see the names that will be produced use the /list switch. AV MAPPING and CODE TRANSLATION The program will perform av mapping automatically. To get the program to also translate the code use switch /trans. With /trans=2 you also get the av map in variable AV. This is useful if there is a lot of AV[...] in the code. They will be changed to AV[...]. Some of the programs can be used by themselves. For example, if you wish to keep the result of the transfer you can assign it to a variable as in toxfrxfr namelist and use your favorite program to transfer that variable. Note that translation problems are more likely to occur with this method. TECHNICAL DETAILS The transfer file extention is 'x?w' (ws) or 'x?f' (files) where '?' is 'u' for SAX, 's' for APL2000, 'd' for Dyalog, 'm' for SAM, and 'p' for AplX. This extention will be ADDED by the program and USED by the program. This extention usage can be overridden by the /apl= switch as in xfrfrom 'myxfr.file /apl=DYW' Possible /apl= values are SAM (SHARP APL mainframe), SAX (SHARP APL Unix), DYW (Dyalog for Windows), APX (AplX) and A2K (APL2000). dumps all objects to file without translation. Those include all variable types (character, numeric, mixed, enclosed/boxed, packages and, within those, undefined) and functions/operators. Packages are transformed into namespaces under Dyalog, overlay under APLX and into nested structures for APL+Win. Special fns are included to handle these in the transfer workspace. They all start with the capital letter 'P'. The code will also use those names instead of pnames where appropriate. reads a file, maps the av if from a different APL and applies code translation if /trans=1 (or 2) is supplied with the argument. All functions start with a delta. For Dyalog APL they all reside in the 'xfr' namespace. Code is written in "common" APL. The internal names (locals) are unusual to minimize name conflicts. There is a different workspace for each APL version. Switches can be shortened to a short non-ambiguous form. The actual switches are (*=xfrfrom only, CAPITALS=minimum length): /Apl*, /File=, /List*, /Noam, /Objs=*, /RAnge=, /REplace*, /Trans=* /Lock= EXAMPLES xfrto 'myexportfile /file=myaplfile /range=100 999 ' xfrfrom 'yourfile /objs=fns /trans' apply translation xfrfrom 'x.xuw /list' only list objects xfrfrom 'fx.xuw /f/n' file, no access matrix Function will look like this when translated SAX Dyalog APL 2000 F; trap;ec F; TRAP;ec_ F; ELX;ec_ [1] 2 ws 2 [1] w_(SI) [1] w_SI [2] a replace t [2] a FREPLACE t [2] a FREPLACE t CODE TRANSLATION To change the behaviour of the translation edit variable 'equivalence' under the APL section desired. Each section starts with a colon followed by the APL vendor code (SAX, DYW or A2K) as in ':SAX'. Each non empty line after is made out of 2 strings separated by '%'. The first one is the string to replace, the second its replacement. Strings surrounded by " are the av value instead. names are case independent and treated syntactically but others are not. RESTRICTIONS The usual ws full problems can be encountered. If possible increase ws size to solve this problem. Many characters have no equivalent in other APLs. They are still mapped to a character when read from the file. If a function cannot be fixed in the workspace (possibly because of an invalid header) a variable with same name preceded by a '' contains the offending code. For example, if function cannot be fixed then variable 'F' will contain the (translated) code. HISTORY This workspace started life as an APL/PC workspace in the early 80's. It has gone through extensive changes over the years. The original workspaces did not have switches but they are still available with the format unmodified. In 2003 I included APLX and adopted CR as the standard for fn representation. DanB 2001 (c) P,,ԕ ȕĖĈxt<"? ͕ < 0   ӕ | CD|(ĕ#'P$ []();/\+-*^<=>,!?~ _}{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789. ':  |`#@"%&   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    %'_abcdefghijklmnopqrstuvwxyz.0123456789$ABCDEFGHIJKLMNOPQRSTUVWXYZ{}[/\<=>^-+?~*( ;,!"#&@`|:)]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ | ! )<=>]^,+./0123456789([;:\_{'*?~ -ABCDEFGHIJKLMNOPQRSTUVWXYZ$}"#%&@`abcdefghijklmnopqrstuvwxyz# all bout copyright create describe equivalencefix fopen fori forme infile nameof parse txtrepl version xfr xfrfrom xfrto xl close create open read write FX XfrObjs Xs Pack Pchk Pins PisID Pnames Pnc Psel Pval (d must be a component($Tz r(1,p)[;0]cn $0r_v_ Pack n_;id_;c_;b_;N_;O_04, !0˕̿  D  Õ ȕ  ,BϕĕĵHHŕo9,X˕LD 4|.0 !X",#•$%M& t'4(")*H+0,,-. /ҕ0<1\O23P4!4ӕ5(ҕ56|7=8Tl ArG is a string with the source filename and possible switches:T4T parms((1q)p^1p)/parms4$ dlm1patn,'/' $ (/q)107 _ NaMFI 3NaM  W89 W944$S NaM2FSIZE tIE$  r_''=,1N_ HQNaM(1,NaM)NaM'** Warning: no /file switch present' H#xlatebUfP '((FREAD t,i,lock) forme nL,i) write r' fori lP4y name of object defined by string4 dT v_[r_]b_/v_ ^ cOde0h 54(4` tq>1q t=1ST quote((y patn[p/pt\i]' 'F(0Z(^/file'0123456789')25 0 @ nLrange 0 for all those that existt [0 p(objs)97 x^nL'cpt' 0D{ r_2 1id_(1 3(v_~' ') 2 n_) 0e X930(cm:t1 @Yelx'l10'$ inWs1070Xi(qii+tpos2)/l10 ,$bArGArG,NaM,cR $ @L (0file)43  Txlate[av] Dffile(^\tIE'.')/tIE(-tIEtIE~ArG':/\')ArGDDPUbUf(~\(rEf,':')bUf)/bUf all the replacementsD$H l20:posssU[t] $DZ Cleanup: remove double CRs and replace CRs by %D4Ul12:bc=fn merge ;locals linesU448h (b1=b)l20 more than 1 line?4($d (W971W97)W82,W83(hecRtcnlPn /replace if objects are to be replaced (def NO)PDDZ If /trans=2 we will change av[refs] by AV[refs]DD0 Except for SAM all should be able to handle thisD0p% (^/range' 0123456789,')340,HQ Non-Overlapping search, end,|h T((,lbr,[0.1]l1,0)/b)\T, 23V 46 4 (';'=fn[t])l20 1st char ';'?24,@ T[b+l1/+\1lbr]S[b+i]5 1,% X890 hWfna FCREATE z l 13X92  :SAPL replace%FREPLACE appendr%FAPPEND 2 ws 1%WSID signal%SIGNAL 2 ws 2%SI resize%FRESIZE create%FCREATE rename%FRENAME append%FAPPENDnor pnames%Pnames ;trap%;ELX avail%FAVAIL names%FNAMES erase%FERASE untie%FUNTIE ppdef%Ppdef plock%Plock 6 fd%ERASE 3 fd%DEF 1 fd%VR trap%ELX rdfi%RDFI rdci%FRDCI size%FSIZE nums%FNUMS rdac%FRDAC stac%FSTAC hold%FHOLD read%FREAD stie%FSTIE drop%FDROP copy%FDUP pdef%Pdef psel%Psel pins%Pins pack%Pack pval%Pval EDIT%EDIT lib%FLIB tie%FTIE ><<% pnc%Pnc pex%Pex out%OUT fmt%FMT vi%VI fi%FI ws%WS fd%FD er%er_ ><% ec%ec_ sc%sc_ ps%ps_ sp%sp_ ht%ht_ ul%1 ws%WS fd%FD fc%fc_ >% >% <% <% enc % boxed <.%<. .%>. >/%>/ >%> >\%>\ >%> (<%( <% \<%\ <% <% <% <% <% <% <% <% <% ,<%, <% /<%/ <% (>%( +>%+ >% >% <>%< >% =>%= >% >>%> >% >% ^>%^ ->%- >% >% !>%! >% >% >% >% \>%\ >% >% >% >% ~>%~ >% >% >% >% >% *>%* >% [>%[ >% >% >% >% >% #<% #>% >% >% >% >% >% ,>%, >% ?>%? />%/ >% >% Rank >% Upon %a_ %w_ % lev % dex % % ibeam % Rank % Upon :DYW IOVFI%FI IOVFI%VI MONITOR%MF SIGNAL%SIGNAL SHADOW%SHADOW ;trap%;ELX FHIST%RDFI size%SIZE PATH%PATH TRAP%ELX "210"% notmatch "47"%"22" SI%SI ED%EDIT ML%ML % union % intersect :APX "210"%"22" 2 CR%VR "175"% index EDIT%EDIT ERS%SIGNAL "11"% Fread "12"% Fwrite SI%SI ES%ERROR "9"% Fdrop "7"% Fhold EM%DM UL%1 FC%fc_ R%TCNL L%TCLF B%TCBS /%/ % %,Ȝmem:(/ppat'=')/comp ,(L readBufnreadBuf ((|fnline0,(0rng)l20$$ c_' '=n_c_/n_$0 domain error means trouble,0MD n_ may be several names. )EVLEVEL 2 or ml 2 onlyD(((1bUf)objs)92((  98(((98)4),4)98(DmNaM(^\NaM'.')/NaM remove any namespace refD$| error q/pat$0sp(1p)-1pp/p(s/sw),1 04ԁ X93ex X99 in case types differ4(bUf(~inWs)create bUf($Lf pat[pat'']'='$(Tl20:line1(tfn),com (hiook0(1q@(  r'**NOTR**' $_r_N_,c_,[io+.1]v_$$dl' ',file,' '$ X n'**NOTR**' 4k will have their name displayed.4(lal2:l0~tno2z''i(, X95fx(2,X96)X93,X94,܎ io0 , X890 result to return?,xh z-zD| ifx((t)'rd s'),[0.1] t'r(~\s'' [='')/s' D$Ȍ v_[r_]VR v_[r_]$( (1rEf'"'=CodT)83 (Lo DanB 1990 (c) return a string representing objects namedL< /file[=] use APL file givennt<, fn(sline0),[.1]scom , w''D read up to 10K - account for what's in the bufferD,ras create file;io;elx, l30, close the current file,Т l3$_ X931-io-X97' ' $, (0nnread source)l20 ,LP id1o_ $̝X99X99 Pack obJ$H\ X98X93X99 split object off string, recoup spaceH$d (t=line0)l60$io0 io1 ,ش add extention to filename,D sourcexFr[1],82,10240xFr[2]xFr[2]-readBufD, attempt to tie the file,$ (t=line0)l160$ (X96=X94)24 | 92Pf Switches can exist with or without [possibly defaulted] valuePd ctcnl?h vaLueobJ ,P (1 3ai[0],1,i)FSTAC z ,H l2 | (2=X94)33 0 r-((r)r0,-nnums)io000gnnbstr  obJfix obJ  dlmt1 io0 rr 4xl  IO0 t rxrqtIE0 ԧ 51" 31܋ 92D0qq,' with ',(61l)'EMPTY Access Matrix'D  (Pchk x)0  92`<    b` Lmsgiook0 0l20:rngcpt=obj FAPPEND tie 04 n(\' 'n)/n(-bb' '=n)n,n4ok1  cptend],Terror r/'domain error',# nw' ' 0 W96W96,^/W960 1vaLueav 0LM$Ffsz2FSIZE tie$((RANK ERROR fx(~b)/p[;3] ^L[S\g(eÕTx`8{w{DÕxRP^     $bW78:vaLueW99''$4تmsg'* Access Matrix not replaced' 4, 0 H,/p ʕ˕.$0Ô}ಔET |   ʕ *DΕ4Hd.x\ T`q 譕+ԍD|,D@@Ǖ~ 4 )!p"ɕ#$h0%, <8w danb 1999 select a value from a package<P this ws should be )pcopy-ed to guard against name conflicts)P, (nc 'readBuf')l5 ,(rng1+''FAPPEND tie  (jp= ף@Dd OK, line[1] starts with a ';', merge it with [0]D$ W76,W971 0W97)$reparg[1] (  (cpt?@DDDDEFGHIKKLNNQQQRSTUVWYYZ[ccccccccdffghijklmnopqrttvvwxzz{|}dH file is already tied; exit if tie number acceptable'HPf If the object name is a package then the defn of its uniqueP 5Z opq^|rstuvL"wkx y!z#{%|,}-1  !"#$'''()*+,-./0223456789:;<=>?@ABCEEFGIIJKLMQQQQRSTUWWXY$`(11fn)l120 $ lobJX94obJ  obJX95obJ  amsendPd# this cpt will be put in the file if new or replaced wanted]PLP if the real name is present we use the fn in the packageL$0(nc'names')0 $ rcn Psel p;io (( file should not exist(  s(i-1)pat  HȭNaM2 5 3'SAM SAX DYW A2K APX sam sax dyw a2k apx'~' 'H(r_o_ Pins n_;io;id 8( AlC[1;] x`no:listendM 0line1((''line0)/'[1] '),com 0  obJX96X98 0rt'' no tie # to close00l W99W99,(io1W97)forme 'x'0  line0tline0 Hmsgcpt f0tend:msg( ok),(~0msg)/ msg[0,*@쌕\hнd0E4 DanB 1997 replace by proper fn.e4L| /q quiet mode - mo messages displayedL0< X96X96X93'dFndFn;',X97 0,D(trans=2)/oNS,'AVbUf',8y l((1l)1nL),(1l)1nL8H tiearg[0](obj FREPLACE tie,cpt (&r0 0'' D$ DanB 1990 (c) Create obJs defined in string. V3D, W97W98'rTvAl;x;',W96,Pmsg obj infile arg;tie;cpt;rng;io;ELX;rep;fsz;ams;ok;listPD STREAM mode - recreate each individual objectD0  r(12r) create Arg0 X l1,patipat (l30:msgok1 pio,pD is used as FI is not available on all systems1D  X97X96X97 $ EXP fori N;F;M;i$, Dt/patn L d,xp$x,ǕxDĮ$  K  - TȚѕ A$͕T,@8Õ6pԕ 8 <!\ԕ"ԕ#8$X%ӕ& O'|(X)s*!+,Կ-:.|/4+0411ӕ23 4Lĕ5p"6ĕ748Օ9P.:;̕<Lӕ=0>?\ @\=@וA@B츕CD4E8F;GtH|I@JlKLҕLL͕MHN|וOƕP:QRLSXʕTUӕV WXpYp•ZT[ҕ\{],p^:_`P a|Õb<c dl>eԧf g$ghiʕihjhkl lmnIno pՕq}rԆrsҕtCu}vdwڕxpL0P p is 2 col of Position,pair #0$ Filename supplied$Dt (7unknown or ambiguous switch: <',1td s D( screen objects here( 13X92 ?$ mask[pos.+l]1$ l5:sparms' ' $Z (obJX95'')34$,aW84:W963\2010vaLue ,(ЏCodT[rEf/rEf]'%' (P Quotes must be used to include spaces or '/' in arguments. P(^99xfr 98;97;oNS($ W88:(0fb<\b)fn''4 i1sp 0 @4 DanB 19980824 name class of names in package@, 99allnl all2 3 ,Tulock^FX{close rEfXfb8l1:i' notr' do not modify this fn8  ,(d s),'0' 0&W77WNCXؐ /trans=(012) is level of code translation to occur (def 0)XT,@<T4d prepare start/length of strings40 (t''ssS[W[i;0]+l])l20 00вW80:W96(-W96W96'.'obJ)obJ0(j r2 11 r repl[0],p(j cptarg[8] ( }}/  !"#$%&'ht04 each name separated by a dot.0@t if more chars are needed we grab them heres@0Ymat: (/'{'line0fn[0;])00,lobJX94obJ,(0X94)/',0',L valid elements are supplied with the pattern: verify themLd544 this cpt COULD be added/replaced4, 0< Pp,ThǕ|L\ pLH o   4 LA \ ~4D|> d\@(~<0D{ danb 19981013 translate text0inWs92 ix D1av$rec nappend handle$ȗ0,|Օ蘕@(佔 ٕ  x D8   9  Bd97Tѕ|X<ڕx0Ȭpxؕ~֕4d X94(X93X99),X97 new full name4< /objs=[vars][fns][...] def ALL (fns=ops)<P DanB 19980824 verify Package is genuine - not valid for SAPLPXt DanB simulate packages. Format is 'ID' (table of name,class,values)X(, rFSIZE t,lock(h,h 4ɕ-H.th4 r_~(o_1,o_)[;0](n_1,n_)[;0] 44l error (1t)/'unbalanced quotes'4$l80l,';elx'$0 #2|k JM/  !$$$%''(**,,../01igd 0<P Is there a file extention? then warn user<$lXfrIDXfrID,WSID$  e>JtЕ,X,#DX0D,ȟD! xT<@("(('l*\pD(P<@.)&dpx7A,+@9l2=@BF$JK8M`QtCLST|:URTLXI%,@hf m\j4hekpildXh  xHXdT|u۔@(Zt,8D, tF6x-N,:e@)1>*,RxqT\<D=Yd,J,H10hY X}P` /l+|HscPxLL"`t9HB0_X.xqLv`$8y]ߕߕߕ'|bLߕa!dV4tߕxߕߕPߕ<ߕ`ޕLޕ8ޕA$ޕhݕ?ޕݕ ݕIޕ`tޕpޕޕUܕ~ܕܕܕpܕgܕޕ3@ܕrޕdߕ\ݕߕ4ݕ ݕݕmXܕݕߕ(ߕݕݕݕHpݕHݕޕ,ܕەoܕ|ەܕەەە|ەdەC,ە|ەHەCԎC{PDdDCį0dܯȮHஔdL4| 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 0 1 7 9 12 27 124 127 8 153 10 155 157 13 229 234 31 30 232 237 233 15 21 19 245 244 167 235 166 151 33 152 32 5 41 60 243 61 62 93 250 94 134 246 44 43 46 47 48 49 50 51 52 53 54 55 56 57 40 , danb 1999 merge packages,  t,file D n_,' ',n_o $`  W82,W99,vaLuek$L0rEf[1+io]rEf[1+io]-q keep track of what's to be readLsArGxfrfrom ArG;bUf;inWs;oNS;rEf;tIE;xlate;readBuf;noam;apl;ascii;cR;debug;file;list;objs;q;range;replace;trans;CodT;NaM@X we rely on packages or fns to emulate themms@ l10] ,Mx$$El,}6$: \    ,+l:XEѕѕ,{T}4 tٕ,@(4;ؕ(J8@̕=4ăPp P!!|" @̅ '' this default prefix can be changed@H The various types are represented by these letters#sHHel2 80l,80'r0elx''0''mfrdac t,lock'H$ X931-io-X97' ' $L,hp”@,L0t(('Package')0,p)0 **NOTR**0TH Shorter names are accepted but '=' MUST be used to supply values.T4" (/X88(io+2)>X93'ej'obJ)26 4,͕,/(p菕ە4 x Xٕ ԕ  / 0 0   ,ڕ̼8 qȇ\Е{p͕ p{0Dh@98)ГAHuG)Dx;L{䤕 ٕ l Ԕ P 9!! .!ϕ!4!!9"|"ڕ""K#,7#$($@%$&D&T?&,&&p&d''ȕ((Tt(Tϕ(蜕)*?*\ؕ+ؕ+0+,B-䶕.@=.|.ܚ.X/x0|}01 128?3344ڕ5͕5;67@ؕ7Ε78 8Ъ9ٕ:ٕ:\$:ԕ;< (''6rep)0 decorators? yes, exit now<0Ѐ line0(-tt' '=line0)line0#0zl10:elx''( 'no more chars!'id($ \qparms'''' $ { pospos>NClA $, (nc 'fix')30$$(X91='?P')/51,45 $0&l12,(qbUfread rEf)116,$ Zl4:i/s''''=t L $( X980 recoup space($(nc'xlate')0$, v_[b_/b_0=c_] '''''' , W88,л fn(dlmfn),(dlm+b)fn ,$L fna FSTIE tno $0tfncr Ode\Yclose rD T is text to search, S is search/replace itemsD(l25:post/tpos>mask($, obJobJ Pins X93 $ H amsarg[6] v_ ( aplapl+NaM[io]( t FUNTIE tIE  bc=fnc,fnat $]r_2 1( id_), r_$$` ww,nreadBuf $$p file MUST exist$(cW92:(nc 'vaLue')W87 ( b_b_r_  am:listshow $sline1s,' ',com $ b W95W96'?' 4xcrr01b/p[;1] unknowns rejected4(Y source[3]10240xFr[2]($ tt++/^\' '=tfn $$(989798)3$, W99vaLuecr W93,obJ me,(4YW83: Enclosed typeay((4=rEf)83 W79:W96'F' 0 $a rEfex XfrObjs$$a (mat2=fn)l10$$ W97 Pnames W973$ lb ('M'W96)W83 `  obJX94obJ next is the object itself. For a package multiple defns follow.`4 r(((Pnc p)cn)Pnames p) Psel p 4((b (1 specifies the tie number and optional passnumber..LDH or be elided. Switches not mentioned are refused.D((% &4 q/$%  !"#$&&'()++,-./0123( X9219J 8\ r0 1l1 penclose s make matrix8@ DanB 19980824 select elements from Packagele@hu,p >0ؕLƕԾh@̅ 1st we find if we're dealing with a "package"@<8wmsg'* Component ',(cpt),' not replaced' <0x(XfrID forme '') write r0@ hdlhdl,nsize hdl must return for APL/PCe"@v l0W[t;1]u elx''| FUNTIE z tx,7>Xz4=t0ģ readBufreadBuf,xl buf08W82:W99((W97),W97vaLue),' ',,W998v b+/l1 'tw Example:@O For non var only codes 0 & 3 are meaningful.@@v where left arg is specified and meaning ist'@<` nse<@  qdlm,'='T 3=return package. With a left argument an exact defn is given..T<l b'**NOTR**' 'no translate' signature<X   asFXTw Works in stream mode where it returns unused portion or by objectT(  error ('='s)/m (4Р (9 2 3 4=obJ Pnc vaLue)/2/W91,W9048T q(01--/l),' cpts transfered''8<Ē and if it's something we can translate:e<l5:io1 luclose f$8R X93X88,' obJ' r$8{ X99X94 X94X99 06 T if it exists; otherwise, create it.TD8X96X94'(0=10dFn',X88,' obJ)0dFn Pack dFn'DT@ Variables holding switch values have the same name as the switchT0 l120:s(-tt' '=s)sfn[1;]0P We must define the fn w/o constraints. We do this shadowed..PL\~ Empty lines: it is assumed all versions can handle themsL8cptam is this the access matrix?es84Tl60:line0s\(s~line0'{}')/line048 DanB 1990 (c) fix vars+fns namese8< file ntie hdl-((hdl)hdl0,-nnums)0a< t q1+/itpatn <P if a passnumber was given, activate it0,<P  Spaces are used to delimit arguments. '/' delimits switches.P8 X940X96(X951-io-obJ' ')obJ e8PbUf(NaM)rEf/equivalence IMPORTANT: 'bUf' starts with a CRP8( remove the occurence of the requestq8  h X96X93X97 X 'pat' is 1 switch group complete with assignment & value if presentX l  error p/m L, (i(/fnaFNAMES)/jFNUMS)l2 check if already tiedLT4 X99fx(2,X94)(X94'rdFn;',X99),X941'''r Pack 0 0''',X99t.T@ ((W94~''obJ)^W97W94)/W89 skip invalid@8$s all(((198),199)98),[io]all8< /q do not display banner< | switiswitr  X97X93X970 t arg is tie#, replace, range(2), original file size(2), NO access matrix, list only, cpt no (0=AM)t8fnfix fn;io;b;b1;d;dlm;mat;t;fb;ce8@| W: which pairs to use; l1/l0: their lengths?@L DanB 1990 (c) form object with vaLue (default by itself)L,Pl130:fn[1;](s1t)line13,8fnbout fn;cr;io;com;line0;line1;s;t880 arg' ',arg ' ' added for LOGOS use8X Check switches: set all allowable switches to 0 (assume not present) XLW X90(2-(X90)nc'oNS')X90'0oNS' where to put theseLH, the result is the actual tie number of the file.HT,ثŕ p~@T 8B `acdefghijklmqnop u"r'*./s0t234v7  !"#%%&'()*---./1123456789:;<=>?@A@L X97(-X93X93'.'X99)X99 drop path if any@<@ write rec to file associated with handle< \ readBufnw X]W90: @\selx'(1E5+/2FSIZE tie)FRESIZE tielc'p@tp,Pڕ0C0*ĺt8 do we transfer the whole workspace?8X Some characters could not be represented in other APLs. All we knowXH them. The following allows to deal with '' properly:HHdkpts> DELIMITERS: spaces NOT in quotes OR 1st quoteHD W99W99,(W95,'.',obJ)forme W97[io;] Psel vaLueD<l is their av position. We find them here.<<h+((~q),rEf)rEf'* XFR version 3.08'le<L define fn - DO NOT OVERWRITE any existing fn if packageL<  object follows as rank (len), Shape, obJ<8 WW,[0.1](1t,s)-W1+tt/stS=1Sq8XTS txtrepl T;io;b;i;l;lbr;l0;l1;mask;n;p;pos;s;ss;t;up;A;C;NC;U;WkXDdW89:W99(W97),' ',W97W96,(,obJ),' ',obJ,W992DLTm 54 this fn will be kept in a variable to be fixed laterL$ (^/m' '=t)/comp$X COMPRESSOR: any double quote OR last quote NOT in \ or double delim.XXD} file does not exist, create it; exit if no passnumber complicationsXT0$l2:(0swit)/l5 $<̛ X8953 return a package of undefinedre<8Tlist104 listing takes place here88| * objects are defined in this section8T with a before or with the contents of immediatly global var eTT cmdarg '/sa /ab= /sc[=] /cd=1 2 3 /e[=]d e f /=*' parse cmdargTTx Find each token in the argument and use the delimiter to separateTPt It relies on table 'equivalence' which contains replacementsPPܚ  toPPm read an opened file, leave it open & return the next object\PH$ pick lowest free tie number if user gave zero or lessHXTx X90X90,(X951X95,X90)X95'.' namespace always followed by dot.X< X94,X99,'obJ' covers boths fns & vars<Dq post/pos some cannot be used for replacement''D<  put in place (doing b/b might wsfull)<,ľ (' '^.=pat(p1)pat)/l3, Xtline0'' 0 @` ns?@@0 create will return a name or a value to file@  X97X93X97A P( translation requested. The translation string is in 'CodT'PP (Sharp starts at r19) otherwise we have to introduce them.P \X9419+,X99 D Drop trailing spaces, remove surrounding quotesckD8wread xFr;n;io;toread;buf;sourceJ84dW87:( Pchk(W97vaLue))W85,W98''b4q end 0|$,<x *z|4 tno(z+((z+j)jz,j)0),1tno4D  /apl=(SAMSAXDYWA2K) source APL; av[positions]D<9999,forme(1+971-io-98' ')98<4show:msg(~ams)/'Access Matrix' 4DO enddT xFr is the handle to the file followed by # chars left to readeTH0 special version for XFR: the switches' header is ''HDȨ Access Matrix: trap access problems if possible'D$Lnnameof str;b;io$,ȧclrp[;1+io] **NOTR**/,4l30:(^/t\pos10,l+pos)/l40 ' 4 `L (0n_=' ')21 Ц id_'Package' ( $ N_1c_ penclose n_(P This is a special case for xfr: if the searched string haslP,]i''N2io,N-io<1=,N ,(y(2 1p)0 21 array(@ /noam NO access matrix reset@(x l10,xFr[2]xFr[2]-n(TT{ this object is either new, allowed replaced or to be put on filerT<(# /file[=] target APL filee<  r_PisID v_o $parms[p/p]1D $@إXfrID'A2K',(version,1002 3ts),'; WS='et@8 |CodTCodT,(trans=2)/'%av[%AV['8< try to estimate space taken (SAM only)<,Lnames1r penclose names,] io0 @ change class 0 into 1, find all vars values@(l20:readBufxl n (Tl this cpt COULD be replaced but all that is wanted is the cpt #eTT@ /list only list items that would be brought indT8 (X91'RFO')54 This is a fn or op'88̬'Can''t fix ',X99,'; reason ',X95 e8<| [namelist] xfrto 'tohostfile /switches'<( X931 create X96X97(\` r_0 3''( t~/mask[pos.+l]s](<0 "" t<L  c.L(|obJ Pack 0 0X97obJ (Pc If in it we seach the uppercased version (for sys names)eP<Dt cpts are missing, pad enough to get there<Xrob xfrto Arg;oNS;file;l;nL;q;range;t;XfrID;lock0X8`(55,58,59)[0 1 3cOde] value in obJ8( l40:pp,[0]pos,[0.1]i (({(iolnL' ')54(8 DanB 2001 define objects in host file8$% (0range)31 $ W79HLrEfcR The CR is a delimiter - no spaces allowedobHPxYll,[io]80'(m forme''AccessTable'')write rr1+1m'P( ArG'*** unknown APL' (Hh wyz{|h H<tp(e^^/tpat)einvalid value for switch <',(i-1)s<LHrnc (''=1id)id APL2 is the only one tolerant of LP global 'NaM' refers to either a ComPonenT or the Access TableP(Da (toreadtoread-n)0(P؞ fn(-bbb^0b''12fn)fn does not tolerate extra charsP8 See [:d]oc for the format of the file8@  c_[r_/v_]2 names are of class 2@Ht X99'' obJ now contains the representation of 1 obJH0p obJ[X88/obJ]'EJ'[X88/X93]j058range(0 1+2(range),/0),NaM8@0l160:fn[0;](1fn)s\(s~line0'{}')/line0''@4 cn(rr1rcn' ')/cn,' ',cn d.4$$W76:(1W97)W89 $$b for various APLs$Dxlateav[Xs[2+io;]] this global used by DDYl7:(wreadBuf)0 there's a least 7 chars hereD ınn,':',1str ,ArgArg,(1XfrID),'f',48obqq,' objects transfered'44ltranstrans default is OFF4LP cn can be a list (cm or cv) of names or a class (ex: 2)L8 Set av mapping; 'a' is for {ASCII}e8,] 'NaM' reset by \,8TrEfrEf=CodT(NaM1NaMrEf=bUf)/bUf8Llmsg'* Access Matrix not replaced (problem encountered)'dLTܸ if /list has been supplied only those that would be (re)definedT< obJW98, Pnames obJ package right argr<@D all(^/all.98XfrObjs)all99allt@P؂ When searching names we look for an exact match (sisize)P<Hl W943 if not supplied chk name is valid<XX create a temp fn to localize trap/elx to create the access tableXT@ if /replace has NOT been supplied then a message will appearT8 m1'>no value allowed for switch <',q8<w vaLueW99fx(2,W97)(W97W98),W97W99<to0$ DanB 1998 all names not used0@oq''=12NaMnameof bUf is this a ? 2@Ht Arg1'/lock= /q /= /file[=] /range=' parse ArgsHHL file(^\t'.')/t(-tt~Arg':/\')Arg'H@p (/NaMrEf12(\'.'=NaM)/NaM4ArG)49s@$ fna FSTIE tno $@X No av mapping or translation for same APLe@X4n Dan Baronet 1993 - PARSE switches and reset argument. Version L2.3XHQ locklock 0 by default - no check if numericsH8 danb 1998 open file, return handle 8 4fn(t+1)fn s $allall;99;98$ tline0'' e  comtline0 l ,n1bstr length of name,,(x qd pat(1+patdlm)pat ,<CodT((1rEf)CodT),NaM,(1rEf)CodT<8 !q8(F))( we replace it if ~ams(PM  f hi|jk  4l X8711X87 mixed or enclosed?4< ((~q),r)r'* XFR version 3.08'<H HD0 0r2,bp   W92 W89 elx'l30'L DanB 19971214 put in file TIEd. Append cpts if necessary.L<rEfopen ArG grab proper fns, open file<D@(cpt.value required for switch <',q?<44bUfav[io+xlate,(1NaM)Xs]?4$_ toreadfi nw r$ $ }} /  !"#($fn0 1b penclose fn(L~  r L8Hv account for mixed types and prototype84NaM1(NaM+2561bUf)av,xlateF4@h W97W97W99' Pdef vaLuerT cr''',W96,''''@4| (/rEf)83 is this a known APL?4(2>p)0  X94X90  X93 X93'end:mat0Pu pp[p;]r obJobJ,X93L bstr' '@ s[i]' '  W95vaLue  fn1,c,fnLg t(-ss)t,l obJX98  postpos $h siswit ( 13X92] NaMX99 0]X88'fx' { X93-X97  X98X96X98 L  L0P((apl=0)debug~inWs)00 aW77:W96'P' A  0 fopen9createix0fileinblist/Ns)Namspprfsz.infilefix b17rngnoam<7tIEinfileqML(xmemvspuacdc( member2KPtestparseljcompcdef@_nofopeniz\ovsinvsfvvmĆvmiovvipovspPvtc0ovvhovvf,pvvc@}mrrun|g0}sc_}xz ~a_P~ec_AFps_sys`FP~Y vvpdZЉvtfnvsc@pvtmȴl45qovem2nomsgendupW798FcR@W78Ul1408 showtrans`;l150PCodT8Ttesofa2kL'ml@<testforallHAV8rTptestfordywfdfmdrDexec`dr0descfd$xfrfromexecrepPier_rorVERSIONwsidH{trlevhmDnponotessw(memltl80x3l60l3<tno$qlbrxArGl700chk<4Ertl0qfnadrl100 asciistrsam`Jrange(argT=replaceefAt$txtreplposHlistL patl40Al9cm!create_debug,patnJfopen!objsJamTQxfrtoobt rnL!parseLsstranslate<nameofjtspRArgfilel1104aplswit 8xfrfromHl904mask0IparmsQcompsegPW ,DISPLAYTP'CMDDISPLAY DISPLAYS HWT0FSBROWSEEyBL̊P  MATIOTAOBJ IFERRIN@YGLOBALPWkMATIOTAeUCASEOBJERRMSGPKGTIEDXTTYPEUFILESVARCDISPLAY<NLDCDEBOBJGLOBALCTdOVEROBJDXGLOBALALX -DEBGLOBALIOYMATRIFYfXPNAMES\UCASEjGLOBALELXxxE1 MATRIFYOBJR hz-hFLUCMD, 4JRXFOPENlOVERP3 6xx5 10]UCMD2V7119`E,zApX@8IhCxkHUV12TWlZPJx14Y13T1617P1820о15pApCL1cRESULTVLeHC)PW6VCxeph1921X$HBHHTl22\LNXK QH$RCSHHL,VT<D|BVDBPUPARMSX87`xstmpW80 rtestXmPDEFLDOUT$nTIEUFTrhPFTNUMeGETOPT infilefrltestl01pickR4boutvcpPtest\wnstl40}l50tdiscutltestxvneptUa QZ&R\c$/PRdIkN>$/SRFT)DWR\lCdl1E KL~PI 2\ m vFv/PPAl2k rp e@ &  0S   h0t\D,t\D,h<PdescribextXchangesr_n_N_zPdefqsp xFrl74nl5 bufXfrObjsallrecthdl@writeobjtiecptlim,amrGXhandle,Hl20source97pl10toreadnOaoNStIeP5Lf7lImtrEf99s(SrHPuPmVdEfSr<98lUrRePdHiDopenfilel30PeNdxAlL`asnLread$xl|closed95(92<1<93@iTems91296Po94xPuP0readBuf90XfrIDpCfiLewiNwSD sScR489 75\8883p8785H8481 767977HW97W9878vAl74W87W93W95obJret W91482dW92880W90p86$W96obJ\W99xfre0W83lNmW86i9W84W85DW82F5XW81XW88infileDW89EXPM8xW94osresfn4dlmHb\tfXl05createell25sD Xmatcom(l60 xfrfileforiPselNaMsCRLFnd_F_7formePnames line0,id_bUfdFnX96X95X94X93X92X91 X90 X894X88Hp3cnvR_ Pncfix0'changea cl[HmFfiLe4xatdefinenpsinWsE nl2op DFxO_Dv_, l120,fns@id'To_|Pexl15vaLue8all2xlatesysIDBlcr 98X99`namesX versionxfr PinsX Plock PisIDdescribesr<XsDl160alline1q l130e X99 X98lX97Create@c_ b_(okPdefPPval(Pchkcopyrightx@PackPpdefcOdenrDM f1] ' vTEsizap@6maF P equivalence d^Qj{    58zui OkKS[8f%lwn\4