V(l+=GE(4U(E(U(U(|U(E(4E(E(V(= 8V(JU(AV(V(V(OV(V(V(f0kU(x%U(*U($U(dE(;HV( sV( V( !01TE(4U( HV(U,V,'W*U(V(,E(V(HV(*U("U(*U("U(h,V(U(DD>(xE(>(P?(^>(@G?((a?(F(>(E(D(p/?(P?(>(5(@(56XD(789%12:;<=>F(>(P_E(H>(P()=asNV(U(nUNV(7 PV(seVV(ibLV(i8fV(anxzU( c OV(lizU(erTV(> XTV( cSV( aWV( @LU( UV( ' PV( ,0VV( UCRV(mUV(e[ZV()+[V( pVV( zU(neXzU(u>zU(moP ()=hyU(ZV(9 WV(it@yU(tebV( DPWV(t pZV(m yU(skyU(zV(0 8[V( li zU(0Hl(end:streattach svn 1 was this session interrupted?(H01 n(lx0(k(('lx' pnc sp)end ((( w( (2pnames sp)end(H8(new>,<'* Verify and use )save to set permanently'E(H(l20:8u( l20w( new1 0(lib1:trap'86 c nodel'l;new0(]( l200I( new1 I( new1 H(l1: check NSVPid's validity (this test not foolproof)HI( new1H('unable to set ''NSVPid''' signal((<1)SITES[;3])111HH( find the NSVP ids of remote machines on this machineHHX(trap'96 73 e lc+1' effective within )111H;()=dV(HmV(oV( dV(xjV(mV(8}V(bV(vV(kV( eV(bV( cV( (nV( fV( @nV( pV(uV(qV(9U(H9U((jV(hV(V(9U(phV(qV(8U(8U(cV((oV(iV(sV(8U(xpV(xvV(`sV(xV(yV( vV( p8U( X8U(!(8U("vV("vV("8U("7U(#iV($7U(%PiV(&hkV('7U((iV() mV()p7U(*H7U(*V(+07U(,7U(-6U(()=(tV(nV( @V( puV(E;V( s(rV(ernV(rotV(n kV(edHV( trV( i0kV(r nV( '. qV( inpV( [3uV( ODyV(  [X H,Fs123 4"T#:$&X((l70:rmsgoutput''((0( rstsend 'pw',pw((((mode[4]<0msg)l70 (Hu(l60:STDATA[Tno;2]STS(1-/(output)LF,CR)outputeH0 ( outputoutput,stsend ')clear'l00(end:(mode[3]^0msg)l60 v ou0(( l30 try o-u-t' ECe( 8(l50:doneout1 e 0`(msg signal mode[1]113 ?0 8( doneoutl50 (P(out:msg'in mode' (0p(msg signal mode[1]112 00H( (4>nbknbk+1)l30dl 1;(0P-t[ try break 3 times, if that doesn't work report problemear' [3P@STS[7]out prompt or stuck processing@0(mode[2]end do we care?(h0Pmsg'Not in immediate execution mode' something running?g siP(X (STS[1]endmsg''70 (Pȸ( task signed on - are we in imm exec mode? do we need to? offeP8(msg signal(mode[1]^STS[3])111 ccFn8@ ( Blot not taken in account (not offered again)@HH(l40:msg1')Not signed on (',(^\~output':',CR)/outputHH&(outputTno stwhatis stget there MUST be output hereE(H@p'(l20:(2svo v)l20sc wait for shareSTASKe@@0( 0 0 1 0 svc v(>''svp) svo vsvr vSTASKc@@(acc(id>svp[2]),(0svp[3]gain)@8 (unix~1vi,>11svpstfindsite accSTS[8`'mode' default io1 1=report trouble, 2=imm exec mode, 4=clear wssg)l60``x( sign on account using s-task. returns msg statusoutput string of tasksignal`h(rmode signon acc;v;svp;io;STASKMODE;msg;output;nbk;doneout;Tno;trap;unix;id;Savk dFnh2n)=>1DU(=U(in(DU([1P{U(av8{U(edCU(erxV( v{U( [0V(idV( (0|U( ,aCU( [V( tiPCU( vp|U( 0CU(vBU(sV(vHV( lBU(o GU( ȕV(sh{U(u@BU(tpBU( AU(1x|U(ccxAU(puPAU(atAU( t@U(be@U(re@@U((0V(t)@U( o?U(ut`|U( ti?U( [8GU( l?U(!)Nh?U(!on{U("tpH?U("/o`U(" ?U(#ta>U(#ou>U($fex>U(% [P>U(%si(>U(&1]>U(11e( E2D((((l30:(0vstbget)l40( ( mode[2]end @(,>1Rs01'00'),'',,>1Ex'02'0201@8f( Ex2(4 ws 0101~'')+''01Fn8 t(Rs''01 Fn 0P_( Right arg cannot be a package0X the value instead and '' will use of 02 instead of 02 itself. XX ( DanB 19970719 default var 01 by value 02. '' in name returnsf. X0@h(0001 default 02;Ex;Rsage0x)= rXIU(pGU(3 IU(deHU(texHU(odXHU(rb HU(wGU(o]x (!( STversion3.06(  `*{Gz@06^ (s 1 " "P(( n mF(UJ,(0AU l J(V( ".residen0H0&&&*** has been modified to use account a caH@te o*F(ULh(Ux(UK J,.Je is t@8 ( (UK "OQP, J8 Z'[L_(ar h(UL" (((h  6])/ UCMD lib(  ((V(  (`( 10 UCMD libbJ(($ainU ;P(( ( u x3 (hrs t  !$ %!&"'#($*%,&-x ( 996 12 1 1 0`(Li19:untie 'Tn' pval 99 0H(Li18:names[numser;] erase er'Tns' pval 99ctsH Li60H( 9999 pins 'Rc' pack 5 00( (1<'Ord' pval 99)Li18 00(('Tns' pval 99)Li19 bZ10(P( ('Tns' pnc 99)Li19((@(Li17:98ex 98/lx (H( clean up if we don't need this in the stask wsonHXLi16b:(098stxfr lx,'/from/rep')>,<'*** unable to bring back ',lxXH"(Li16:(lx'Name' pval 99),'''Rnp'' pval 99'H( Li17H(Li15:('Rnp' pval 99) replace 1fi 'Name' pval 99 H8`( (er(0=10lx)/lx)Li16b,Li6Fn80(Li14:lx3 fd 'Rnp' pval 99 0( Li10@Li13:('Arg' pval 99),'''Val'' pval 99' @HPx((er('Mfl' pval 99)/'not without rep')Li6Hp`((0 19 =er 0 19 1[(1 0 =(1=1er)^ 0 2 =er[(er0)1])1]'incorrect data type')/Li13,Li6p0(Li12:er,5 ws 'Arg' pval 990( Li10@(9999 pins 'Val' pack'Arg' pval 99 @XH((er((1=1er)2=er[(er0)1])/'incorrect data type')Li6''Rnp''X0(Li11:er,5 ws 'Arg' pval 9900( Li6'8(Li10:9999 pins 'Rc' pack 1 s fn w8( ern0( ('Mfl' pnc 99)Li10 al 990((Li9:'Arg' pval 99 T((((Li8:'Arg' pval 99kq(x( Li6 0(Li7:9999 pins 'Rc' pack 9 0P'Ts ('Rc' pval 99)Li4,0,Li9,Li11,Li12,Li15,Li14,Li16,Li17,Li8iP`( del :( `(Li6:981 i7 P if we exit right away we go to Li17; 98 means 'clean up'l>PX(9999 pins 'Rnp' pack1((3=98)/'''1 fd'''),' ',((4=98)av),lxX8(9999 pins 'Typ' pack 98nc lx s8P0(Li5b:(0stxfr lx)/'fx>, on the stack?R-LF P0(Li5:lx'Name' pval 99S(0`(Li603P(9999 pins('Typ' pack,2) pins 'Rnp' pack read fi ersioP8((^/vier'Name' pval 99)Li58 ( lx'',Li7 0(Li4:trap0/'0 c ',Li6 p0P( we want to find problems so we don't trap errors as in P( er''(( pdef read del,6 x d(Li3:99('Tn' pack del) pins('Rc' pack 0) pins('Buf' pack 99) pins('Name' pack er) pins 'Qio' pack io @0( pack all info and get Soliton's fn W(@8(lx stie del((del)del0,nums)0{88( (del(/lxnames)/nums)Li3ng bac8((Li1:trap'0 d exit' (( 0@( '** file not found - unable to edit' al @(((lxSTdelfile)Li1 ( 0( ps 1 1 0 1 0((0=nc '99')/'99''''' 000( 2001: modified for Linux0@x( the name in er is presumed to be in s-taski1@H( danb 19981213 from the apl full screen editor(H8((99 stdel er;lx;98;trap;del;ps9)/'8pFiݽ<ux[U(LU(=X[U('[U( ZU(0 ZU(ҘZU(ilpZU(**0ZU(e ZU(- YU(edYU(6]YU(p@YU( ' XU( /XU( )/xXU( [(XU( stWU( dWU( nWU( PWU( i8WU(t WU(fnVU( pVU(Tn VU(l)UU(' UU(piUU(papUU(in UU(paTU(inTU(ac@TU(de TU(l,TU( [SU(anSU(prpSU(weHSU(p SU(inRU(] RU(0/RU(LiRU(',XRU( RU( 'QU( l QU(!13xQU(" QU(# PU($inPU($achPU(%i 8PU(%LPU(&5:OU(& ̠OU('16XOU((meOU()y NU(*inNU(*onhNU(+ [8NU(+eqNU(+wiMU(+clMU(,taxMU(- [HMU(-((MU()~ cp[6 }~6s_o0!&)/2569:;<=?@ATBC0(ws:'** back in parent ws'ut^.0(x( 6 fd 'STS ',STASK(0(end:'** task disconnected' se0 get (out:stout .25d ( loop H( output d (help:SThelp | 6( loop X4( output ] 08(exec:stexec(1+in'')in 0( startz(task t 08( (t1fi(nobl' ')nobl)ws'00(exit:STDATA[stno;1]1ctl 08@(ctl1t 2 1 output12 2 1 1 3 5 28PK(t>(1 1 1 ,t, 2 1 0 0 0 0 3)1,(1+t+t), 1 250 0 0 0 0 0 0 3P8@(toutputSTS[2]/'signon or signoff: 'c8 D( 1 svc 'ctl' @P(ctlwait:(2124 svo 'ctl')/'ctlwaitsc' 9@0( loop blot for non IDSH''0((arbout 0output [1] (@((2=runs[0;2])ctlwait bypass if 327xands7@8H|(blot: should always be signed on here8 ( processl' ((Sav stxlate output E{(H`( we don't gather output, we display as it comes ws'H@P(STS[1]blot those 2 lines new by DanB]tno;4@8{( i/o is kept simple - no gatheringS8 @O( STS[5]arbio (8( valuelengthvalue (0(l10:output6lengthvalue 00( ststatus,length,value)ws0 hN(STdebugl10 8z( STS(82)t[5] STS is STask Status80x(length2562tSav6value 0@z(process:(0value)STS[6]get,STS[2]loop,end@H( 'value' contains one or more catenated output stringsH q( valuestgets ((get:STS[2]end ( @w( tbackn 0e( stset tin (((set:t-'&'=1in [29](X input lines ending in '&' are sent asynchronously (no wait for reply)X@i((STS[0]^']'1in~' ')ucmd user commands hel@@i(l5:(special0 slen١>STDATA[stno;4]( 0( aioqio''put {( STS8>t[0] (( output>t[1] l (( (tSTDATA[stno;] obJed (8 j('* Task ',t,' -- )help for HELP'us 8@h( t(t),' ->',>' ',>>STDATA[stno; 2 3] inte@0h(start:stno1+tstcurtask vx'0e(start8xh( main loop[8e(looplP enhancement: make /arbout '' prompt appear at the beginningPH0(traptrap,'110 c end111 o c ''no such task'' ws'HXh{(trap'102 1002 1005 e stcheckbreak 105 c brk 106 c atn'reply)X u( value''p Fn (pw250 8@h(labelsexit,exit,exec,out,help,edit,xfr8P{(slen,>special1<',)exit,)x ,),)out ,)help,)edit,)xfr'ngPH( those special "system commands" are available:nW(H8g( 'task off' signal(2>svo STASK)11148(( STASKMODE'last' 3ctl(e(io0 ie(@h( )help describes all the available commandsS@ p( Version 3.25k @g( allows to toggle between several tasks' o:ai@8g( simulate conversation with a terminal8talk;aio;apl;auto;cr;ctl;length;nobl;output;qio;slen;special;stno;t;trap;value;STS;TRAP;io;pw;in;labels;STASKMODE;Sav82)t[@mnݽ<15HrU(H_U( rU( qU(n qU( pqU(:sXqU(tc@qU((qU(>pU(TDpU(2 HpU( 'pU( ,'oU( fooU( 9]xoU( [s0oU( ounU( nU(0]nU('xnU(vHnU(A[nU(1]mU(hemU(remU(eq`mU( [@mU(A[mU(SlU( lU(SKlU(23hlU(tHlU(( lU( 'lU(/^kU(4]kU(ia(kU(>kU()/jU(] jU(']jU()xjU(r 0jU(26iU(liiU( iiU( sehiU( on8iU(!waiU(!lyhU(!:thU("n hU(#inHhU($ [hU(%TSgU(%vagU(&[2gU('e'@gU((ongU((cafU()tpfU() [fU(*s:PfU(+)fU(,,SeU(-,eeU(-enxeU(-t`eU(.e @eU(/)eU(0 idU(0atdU(0STdU(1 dU(1le`dU(2e 0dU(2utdU(3thdU(4alcU(5vacU(5[5cU(64]xcU(6s `cU(7e HcU(8ri cU(9STbU(9 bU(:nebU(:anbU(;e hbU(;erHbU(<e bU(< ibU(=7]aU(=xlaU(> aU(>[3paU(? s@aU(?ys aU(? oaU(@] `U(@[0`U(@it`U(Aif`U(A x`U(BH`U(Blo `U(Cfo_U( [@Z #(xFr10((rstretract n;io;sj(P(/s[2 6])0 not off nor last text was prompt for inputP(( s>STDATA[n-1;0] bJ(01 ' OQ/P  0((1(STprefix,(n),'str'((P(cloneidsvn cloneidl(0x(streattach cloneid;t;v;n00p('STDATA' default(n,5)<''las08 (STASK,1v 0 0 1 0 svc v1 svo v8 ((f)70  8( remote tasks cannot be reinstatedFn8 8( f'r'0 0( 1st try with local UCMD file0 (70:f,'c'Fn 0@(f stie t1+/1000,nums le0 STdelfile0202 P( STS[8]l30 (XX('acc' is [account[:password]] /switches. See SITES for list of sites.oXP((mode[2]/mode[2 3] clear ws implies imm exec modeNot sP( end((TnostinitSTASK svptput((* 1 del del (( end ( STS[3]end pa(stsetcloneid   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ $  []();/\+-*^<=>,!?~_ܭ}{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789. ':  |`#@"%&徼е뱿 c^l(TES[linux]t,(0~U(U(0U(HU(@0(linuxK+(:'*NSVPide@F (* sr   ,@(o J (V(F/((, E F &(E((P 2(U(V@ , (U8, (U>"0P(  FF `sE((( b12 1N-ii+i(8.7 &(V@ (V+ F++80!(ut (V( , D(((/  + , , (8 E# , (UOQ/P8(7008 ( `'iF N @ ,(V@F(Uר, '"j ](V@,@ stout 0 (UF(U 620;wAAf1#rP5:('3'stsend 'nc''u''')10 does this fn exist?PX`( simulate user command processor. Can be processed in mother taskWX((rU c;STASKMODE;io(X find in which library user commands are (lx resets 'SITES[;3]')X$(U F( rio1@U 0(8:rstsend ')copy ',r,' u'00( find where the resides0SAj < HU(mV(/shU([=`U(3 U( /ȊU( c U( U(lmXU(' U( arU( adU( GOU( U( \U( sU( g=pU( U( HEU( nbHU(otU(l(0U( U(w8U(U(pU(pU(),HU((~HU(wi0U(qU(5]pU(t)U([0U(~U(')U(HU([1PU( FU( S؋U(O U(ENXU(TEPU(/U(0 U(n)U(paU(p/U('hU(CHU(ESU(AL0U(ITHU((F(U(OTU(0]U(/^pU( dlU( 1] U(!atU("atXU("i-(U(",XU(" U(#iU($ [U(%ESU(&TC0U(&LYU(' TU('SIU('l2U(()/8U()p PU(* U(+itU(+' U(+ aU(+wiU(,dU(-atU(.+U(.EU(/tU(tn((STASKMODE'gather' J(8( s\swt(>((fo 70ch 'iga50Er [RAL30SPACURO10NG Q3:(MT' '=s)ucmd] '= t,q,'s)'ft' 41 cELIMIX( DAN BARONET 1993 - parse SWITCHES AND RESET ARGUMENT. VERSION L2.22)X8(('unbalanced quotes' signal(1t)Er EC8P( pat IS ONE SWITCH DESCRIPTION FROM THE patTERnS ARGUMENT0 ,iP8((/iit2 0 0 ,iqpatn)l0 Er HE8@(pat'unknown or ambiguous switch: ',1td sTHER@X8( SHORTER NAME ARE ACCEPTED BUT '=' must BE USED TO SUPPLY VALUES.t X@P%(p(e^^/tpat)e`V(HV(0V(V(V(iV(aХV(V({V(V(dpV(fXV(@V(e(V(V(V(V(ȤV(V(V(V(hV(PV(8V( V(V(WV(أV( V(V(V(xV(`V(HV(0V(V(V(V(qТV(ZV(2V(V(opV(ȧV(V(+V(V(EȜV((V(`V(pV(}@V(V(V(pV(xȖV(8V(X`V(0V(IU(V(V(V(xV(ГV( V(V(V(V(@V(@XV(ؑV( V(V((V(XV(pV(P}V(sPzV(xV(V(0yV(hV({V(j0wV(wV(tV(V(yrV(oV( }V(uV(qV(jV(DU(lV(QlV(lV(sV(U(lV(lV(xlV(`lV(BHlV(0lV(lV(kV(PkV(TzV(xoV(gV(eV(hV(fV(8U(E( U(E(U(E(U(E(}،U(E(U(E(U(E('U(E(HU(xU(E(U(E(xU(E(U(U(E(zU(8|U(E(0xU(E(PE(0E(E(qE(ZE(2@E((E(oE(E(E(+E(E(ED(D(D(p(D(}`D(D(xD(D(xD(D(XD(xD(|D(yE(зD(E(pD( D(D(CD(qD(jD(SD(@SD(pD( .D(p,D(0D(.D(>D(PD(s D(PD((0D(X D(УD(hD(jC(pC(8C(8D(ypC(C( D(C(C(0C(hC(PC(Q8C( C(C(PA(C(C(دC(C(BC(0P( DANB 1994/03/25 17:47'08( parms((1q)p^1p)/parmsITCHES80( ,q,'',(i/'1(\s)/'),'t' 0p/(50ȯ( 0 process here instead'0H`d( if parameter ends in '&'. c is string to sendnF(H`(uH1 ''2001DanB 2001 This workspace is used to start several tasks using the S-task processor (1). It allows to switch between tasks and transfer objects. The notions of 'parent task' (this ws) and 'current task' are important. The current task is the task you (in the parent ws) "talk" to. You can only deal (talk) with one task at a time. When you switch to another task it (the new task) becomes the current task. You can use the functions in interactive mode with the program or under program control with the functions. The functions of interest are: signstask signon a new task using your account [c] signon '123:pw/S' signon a new task on acc 123 with 'pw' as password 'c' is: verbose, imm exec mode, clear ws wanted S is the remote system nickname; if not supplied the current machine is used. See SITES for examples. clearstask start a new task ensuring it's in a clear ws task 2 select the 2nd task signed on tasks display the list of tasks signed ON or OFF so far talk initiate a session with the current task. Within use )help for details talkto 3 same as 'task 3 talk' talkto 1234567 same as 'signon 1234567 talk' Other functions of interest can be used within code like stsend 'exp' send 'exp' to current task, result includes prompt (see SETUP section below for details) n stsr 'exp' same as stsend but to a specific task stout send o-u-t to current task. No result. stbreak send 2 ATTNs to current task. No result. stxfr 'object [/to=] [/from[=]] [/replace]' send 'object' TO (default 0= "mother" task), FROM=task to get from (no arg to /FROM means transfer backwards), REPLACE if present to overwrite. stfilexfr 'file /from= /to=' will transfer a file between accounts. You'll need the 2 tasks to be signed on before initiating transfer. (this will also work between different machines but it is slow). User commands User commands are implemented. For details see APL+'s documentation. Function performs the equivalent of UCMD. It should be modified, if necessary, to use the account where the main file resides. Modify line 10 to use the proper account number or call to do it for you using the APL account your are currently using. Note: The user commands came from STSC's APL*PLUS version 10 and many will not work in a Sharp APL environment. Some improvements have been made like ]varcommandx args (result CAN be captured a la Logos) Transfer between machines Inter system communication is available with restriction for V21. This means that workspaces can be loaded on a different machine and items transfered between machines. Communication between machines relies on NSVP. All machines known to connect must be described in variables 'SITES', a 4 column table of 'nickname' used with as in signon '1234567/prod'; here "prod" is the nickname (a char vector) 'system ID' known by NSVP (a char vector) 'system NO' as determined by svn. This should be set once and )saved 'ucmd acc NO' where the main user command file resides on that machine For example if machine 'XX' is available and user commands are available on account 321 on that machine then 'SITES' should contain a line like (,'mx')(,'XX')(svn'XX')321 using nickname 'mx' Transfering files between accounts stfilexfr 'file /from= /to=' /from /to are task numbers This is very slow and impractible for large files. Setup This workspace should work with SAM and SAX including Linux. You should set variable 'NSVPid' to contain the string identifying the system you're running the workspace. For example, Soliton's "lab" SAM is described as 'ipsalab'. This string is used by the remote systems in determining the remote svn id. Returning results When using function it is important to consider the length of the output. A long result could take time to gather and could provoke a ws full. For display purposes it is best to display the output as it comes in. In this respect the global 'STASKMODE' is used: set to means 'gather' gather and return ALL output 'last' display all but last and return last output 'none' display all output, return none For example, the expression "stsend '1e6'" would fail due to a ws full in 'gather' mode but would display properly in 'last' or 'none' mode. See 'example' for an example of a multiple tasks session. DanB 20011ctivH0x#( (/p2'[=]'pat)mem Er0P DanB 1992 default CHARACTER STRING r BY value IF IT 0}P j <U(U(8U(U(hU(U(U(U((U(U(0%(pat signal(1+/itpatn)Er0(( pat[pat'']'='t(((mem:(/ppat'=')/comp(((rr default value(0(sp(1p)-1pp/p(s/sw),1 00p( (' '^.=pat(p1)pat)/l3atn0H( OR BE ELIDED. NON MENTIONNED SWITCHES ARE REFUSED.F(H '( sp1sp 0H#((r1)0 also a valid value0@8( THE FOLLOWING ALLOWS TO CONSIDER '' PROPERLY@0 ( qd pat(1+patdlm)pat (0 P( s[i]' '  0H#( (211,5 ws '')/''00108(U(STresetMainUCMDlib( Xz( EXAMPLE:@ c( swits/arg  P(io1(pb(l1:(0pat)/l2 ( {( u 1c  @(m[b1;]lineFn (j <ȃU(`U(dpU(ue`U(nBU(ul`U(R hU(Y 8U(T 0U((r U(soU(alU((rU(rU( [U( rU( AL@U(F UM0 (  e0 ( s(i-1)pat ?( xL( ipatdlm (U ("Jne( (l5:sparms' '  U(STversionobJ Xz(STprefixobJ k(mod V@CMDb 0c(STresetMainUCMDlib;m;b;line;io0 ,(STdescribeobJ (@"(e''2(q)pat @(?(((E( patn[p/pt\i]' '((a( parms(~s)/arg obJ((( (' '^.=t)/comp ltk?((( ((k?(((b(l2:(0swit)/l5 ((xa(pat1(\i)/patn (@Pc(' has been modified to use account ',1ai@ 0d( qdlm,'=' 0e(line,(b/' UCMD lib'm)m0 ( D1av- 8b(line[(line'''')+10] 10 0 1ailib8 F(mcr 'u'@ F(STmaxwaitobJ ( l3711  0( l1,patipat @( t\arg='''' @)(r2 ws 1  ((r,STavs[other+io;]bdi( p(rSTav otherTav   p(SITESexample  U( Dt/patn t (STdebug @ (av 0 H-pc k(bfx m @saxx 8 @@zapl  5  ȟ-t   @l @aplc h- ؔa -f x@ipsa Q-X px-p xQ-ض ˨-z @ipsa k(SThelp @prod x  (@zoox @aplc - Q- X@finx Q-Q- H( i1sp pat (ipsaint(h(SITESHj <U(hU(?(U(?(U(?(H j <U(U(?(V((V(?(U( LU(?(U(KU(?(XU(KU(?(U(@KU(?(XU(JU(?(U(JU(?(U(xJU(?(HV(( U(U(U(@U(U(xU(U(@U(@U(U(`U((U(U(hU(U(pU(U(HU(U(U((U(U(U(U(U(U(xU(U(`U(U(HU(hU(U(xU(U(U(U(PU(U(U(2(STav(STavsHh(mod: r IS not SCALAR 0 - IF value IS NUMERICnF(H( 0k( l2 @ DanB 20020212 return other translation setend@(`linux((xyzsax((ipsalab(HFj <QRU(HU(12U((V(':U(xU(HV(H@ DanB 20010904 1 if Sharp APL under Unix (SAX)@(SAX(`ipsaint(H( DROP TRAILING SPACES, REMOVE SURROUNDING QUOTESH pH(r'A'165av HK(ifx((t)'rd s'),[0.1] t'r(~\s'' [='')/s' UOTEHQ-h(otherQ- ( SAX81@dFn 8LFobJ x(task n;nam@task 0( danb 1991 stask selection(0 0q(b,>s[;2] CRobJBPr(<0 n),active,s,(2svo STprefix,1 'li2' fmt n)\<'off'tPnonent(pc((nc 'STDATA')none (8L( show list of tasks active or not8Psts2<'imm,blot,off,input,cr reset,arbout,prompt,output,'P@ s[;2]((12b)١>s[;2]),>(4b>12)ҡ><' ...'@H(('invalid value for switch ',(i-1)s) signal pErF(H(^(tasks8HI( s[;1]1ա>(nt,8)b\b/(8nt)stsFn8X COMPRESSOR: ANY DOUBLE QUOTE OR LAST QUOTE NOT IN \ OR DOUBLE DELIM.XXX( cmdarg '/sa /ab= /sc[=] /cd=1 2 3 /e[=]d e f /=*' parse cmdargX0М ( 'b"% 0t  wssvs S [3help  (exect^.+^exitin ecaeditslein/xfrls []^]ucmdn~'se backndst ibrkendie eatnsynco aarbir rettarbio1tnctlwaitSSblotnd t 2processs nset moroupstartin(@S ('23(S8labels]as TRAPs [g1valuest,astno33]6especialentslenue bi qio  smnobl no35 length]e  ctls ne6]autoon'pu,apldispme aio p(namX]((av[0 6 0 0 0 0]STprefix,n)0r'*** NO, permission not accepted'X0b( (nnt1sSTDATA)none0 s0p (rSAX0M(active<0(nstcurtask)\'*' 0P[6'invalid task number' signal(2svo namSTprefix,n)111arbinP(c(none:r'No task' obJ(0](rtasks;io;active;n;sts;nt;b;s0Hh(r(>SITES[SITES[;2]STDATA[stcurtask;4];4]),' stask'(HP=(taskXj <:sU(pU(36U(k @U( CV( stiXX@^( danb 850704 retract shared variable from s-task 'n' (positive#)ted'XPar'OK, your SVN is ',svn 1 use same clone ID to retieP h/ (X active ث(b,8>s[;1] nk @( switch and talk to task N or account N na@Pecal30:1signonn if '' will take care of blot)ucmdP sj <puU(U(diU(arU(ncU((nU( rU( sU(10U(t \V(ba((talkto0( l40 specific task number08@~((n>99)l30 new account numberlo8@(io101X8L( CHECK SWITCHES: SET ALL ALLOWABLE SWITCHES TO 0 (FOR THOSE NOT THERE)XHxS((' '10n)l30 character arg is clue to new signonHh(talk8[(n stbset(STav>STDATA[n-1;4])[0 0 3 0]80 ( r'*** NO, task not busy'0 80(talkto n@ BSobJ|(io0 P DanB 1997 send string to task t, expect a NUMeric answer0P ݽ<??HxU(U( 1U(sU(;U(rexU(he`U(s pxU(te(U( mpU((U( M a`?ݽ<??U(p V(??U(0U(0U((U(`@stsend 1'''twsid ''Stask',stcurtaskio0@ ؿ (' (4(9998 stsrnum 97] (( ('% con(((l0:(2=svo 'x')l1 3,4(()( 97~99CR,LF (()(9998 stsr 97 obJ(8 ($ z{&) !91188x(x(9)(1+-/tl[2 1]),ai[1 2]-T dFnin8@t( can't be done if we are in imm mode:@ *(T13ai @sENd 0( io0(1 3 to) svo 'x' for 00( this fn is use by 0p(task n (tlH`(981'/= /newname= /from[=] /to= /replace' parse 98eH`(89'ex',89,'svr',8981,87,81 to not confuse share var proc severe8`(((to=from)17 e stsr((910@Ы( stxfr 'abc /to=3'; 'cxz zz/from=0 /replace'va@@`('** unknown object to transfer: ',94 slow6]@Xh(from stsr 'ex',89,'svr',8981,95,81 severe link 2 if anytXXH( at this point the variable should be fully shared - let's check:0)s X8(( /to supplied default /from=activek8P( DanB 1995 transfer object[s] to parent task from stask[34] PXЭ( since there is sometimes a delay in NSVP we 1st check using svs',8X( 07,8( 59reX(8490/'scsc3~0 1 0 1',(STdebug/''),'svs',81,87,81 1 & reX8H(from89-189from default,970'18@H( let's check if it exists on the target system@X0=( we can't use pack with nsvp cause it won't allow fns to be xfredcaseXPx( 'objs' is a space delimited list of objects to transfertion P@ذ( looks good. Let's share and transfer. TO 1ste@(we 1st`(to stsr '(',96,')svo',81,87,' ',83,81,89 link 1 & reestablishto ```(from stsr '(',88,')',82'svo',81,95,' ',83,81 link 2 attempted911``0to stsr 'ex',81,87,81from stsr 'ex',81,95,81 erase xfr varsle`( 5948@(925 number of tries in case NSVP too slow/@0( no (91488( '* To & From tasks are the same' 0) 88б(901189 2 different systems?1,98H(t [54]8( 32 if 0to stsrnum '4ws',89s? 588@('** object already exists: ',94 debu88(from stsr 95,'1'to stsr 87,'0'18PȲ(99910 result returned is number of effective transfersp: PP( No /to /from supplied means /from active to parent task81,87P8P( 86,>85/(94,'')'3fd ' no pack88('** unable to produce object ',94 8Pس( by default transfer goes from active to Stask workspacersectPP(46 if '2'erfrom stsr 82 wait for 2 ways connection P((l1:ixxread t,i,l(`ej <feU( V([3U(8 V(STU(88EV(o)`((rxl stxlate string,89(0x(tl sENd to;x;i;t;e;io;T;l0Hh(pts> DELIMITERS: SPACES NOT IN QUOTES OR 1ST QUOTEH((stxlate ( etl[2] c 0.(r((-r)string),rCR for now800 ( DanB 990407 translate strings0h(xlPan f>efghi(jklmnopq-r.stuvtaP 0( ltl[3]y Rsj < V(U( [U(s U(s hU(trU( 1V(9V( U(meU(,(U( U( U( ),U( 34IV( stU(88U(8U(8`U( lXU(nyU('V('@V(8V( V(fu V(arU(re V(o `V(, V(,hV(,U( U(reU(U( s@V(8U('U(95U(81(U(atXU( 8]@U(!atV(!t EV(!leCV(" f U(#d U($ecU(%92U(&r U('n xU((toU()] U(*'ňEV(+stXU(,aiV(-ysPU(.n U(/92H,V(0scV(1[4U(2 tU(3mePV(3la(U(4we V(5 uV(6[4hV(7 pV(8esV(9SVPU(945V(:stV(;'U(;87V(< U(=spU(> 1V(>de8 V(?'V(?87V(@ `U(@ 0V(@caU(acp P cleanup: erase shared vars on both sides IF we did sharevskP u80 of e S81oo s8 fererrots 8286, T83g>,64i84'valr  8592[5]86992 f8798 988[60]ers89aredh i90IF w[6]92to,193,81'e9481,sex95ars tak96not 80( various switches are accepted as in88( /from supplied default /to =actives38Px( for release 21 or less + it won't def fns if in stackPH( 99fi 97\97/99 *.danb.util.tasks.stask:[3]---(HZ(stxfr8( 59 *.danb.util.tasks.stask:[20]-E{8 (tl4tl 0(s(22 if 0<98(94)98 i0 (S((e1q t=1ST quote((X(l4:i/s''''=t lt((( \qparms'''' (H@(( r( ,(d s),'0' ((r0)mod  x(Er711 H(STASKMODE'gather' ~ from to replace er STASKMODEHs(toh( DanB 20010904 change the library number in fn to use the current APL account dFnh@x (925 number of tries in case NSVP too slowx@@`( let's put in values to make NSVP happy:ystem@ (83STxfrname 0 (62 if~stimmexec 89from[08(STDATA[n-1;0],(8STS)/285/'''1fd' ( @( l0,sc 'x' `4( 81''''@  (0 3( 910 ( (9999+132 d (H(l10:l256Sav2var yC(( rj <g V(8 V( @V(0 V( [V(f, V(V( V(V( V(A( V(nV(0(1(STASKSTprefix,98 yzs(@@'(9998 stsr 97;STASK;trap;STASKMODE;STS@@'( danb S-Task Send/Receive for specific task.A(@@99er *.danb.util.tasks.stask:[10]--?????@ 4( STS80@stsr 0 (986 ~ STASK STASKMODE STS?0 P( e1 svc 'x' (rio0@ c P[sc(0>svn cidcid+1)lc loop until a valid CID is found [11] P(1( STASKMODE'gather' ((<(cidstsetcloneid;nWji^(Hg(991,CR,97trap'11 8 o e 00 o e ',799'' H 01 8x1((0>cidsvn n100000+''runs)0 dFn8  (x 0p( ensure proper clone idkVg0 Hn(99stsend 97 ( 85[1]1n H(ststatus @ (< (Ns_(Xj <V(hV(V(@ V( V(XX ( the '' is to prevent to return a value (using for task 0)X0=(STprefix,n,'av[4io],str'ot00?(n'n' default stcurtasktr'0  ( `4(stsststatusa (@x(rstsend com;trap(X danb 830923 send & receive current Stask. 1st break sent to staskX8PR(trap'1005 c stbreak ok,trap0'80R(ok:traptrap,'8 c 0' 0 @H (]' }(stset( (7sO(H(\(94(98' ')98 loop over each item to transferF(H Hn(stsetcloneid Hg(28 if/85'23'erfrom stsr 'nc',8981,94,81 (HP'(stsend(( DanB 990407 reset wsa((( rstread stcurtaskom'(Xex(m[;STprefix]^.=STprefix)m eras vars used to communicateh`XH(28 if 0<1from stsrnum '4ws',89 system variable?HZ(cid@ danb 850704 s-task var set (with header)[@Z( cidn 0 ~(stresetws;m (g(STASK,'(41av),com'(P(m;traptrap,'110 c elSTS[7]0' line cut (no contact)PH`('variables still shared' signal(2svo mnl 2)11F(H p(0 @(er 0 0 '' X(ݽ< -V(ZV( 8V(si`V(] yU( () X 8[(n stset strE[ ((stretract"@ ȋ(cloneid @ ( P(remote@`l(6 fd 'STS STDATA STASK NSVPid STdelfile'@P'(stread(io0 8( again 900904 to handle 'attention'8@( danb 830923 read shared var from s-task that @(( el in@(STDATA[tn-1;0]STDATA[tn-1;4] us0Ps eSTASKp,n((1+1v)(2=svo v)/fi,' ',nv)0 reuse varss fP h( p6'' v j < V( *V(8 V( )V(X$V(#V(9V(V(V( V(@!V(PV('V( V( "V( V( `V( #V(H`( danb 850704 send an 'out' including backspacesH(H(STSSTS,nul^2t l(((sendbreak:stbreak st'(((( arbout Sav6nvarA((@( prepare global holding all Stasks datas[2]@@X(vv''>s[1] find system's data row in SITES@8(v(v[;p]^.=p)v all S-TASK vars88(STDATASTDATA((n>1STDATA),5)<''8(8(nstinitSTASK s;p;v;io(P find a name for new S-task style CMDx and prepare its dataPHPZ( if xfr to be done on same system then nsvp id = 1 (Hh(8(v,1>SITES[;3],>0 cover '' casen8  ( 0Ѕ('STDATA' default 0 5 '' m0 (stout;bs@ (show:nulel ((el:(varnvar)l(X?j <??0"V()V(?? .V(??P#V(??p*V(????X((rstimmexec n;io??????(P??? All this excercise is because sites may have been configured?P( (lmodeSTASKMODE'last'(H-( modenormal promptsaccountsystem idtranslationHP( break H(STS[5]aout 8`((rn0)0 Mother task always readyus8@STDATA[n;]STSps[2],SITES[v;2],<~1vi>s[2]@  <( alllasttget P(vp[1] nl 2 (0l more P(stinitSTASK (E(n0,p,STprefix obJSK(@ * ':&AB1C2(82)@Fnol25~1X( returns nsvpid,account,cloneid. nsvpid will be 1 if same as from's''X@( differently from one machine to another.@8( task n is presumed in imm exec mode88(sd(00(1ai)NSVPidio0)STDATA 88`(a1,fi,>sd[n;2] nsvpid,account#nitS8(`E( STASKMODE'gather'eda(P 'from' is >0 so we ask the task 'n' what 'from' looks likev[;PHE( get full clone ID of task N as seen from task 'from'iHX( There are 2 cases: 'from' is 0 (this ws) so we look in STDATA for theX8( (t<0)l25i11111 use currentATA T8pj <0 8V(V( V(;bV(anV(en8V(t'0V( b[2p ( STS8 0 0 1n ((more:varstget 0(ra,tn stsrnum 'svn 1' n;3]08(l20:ra,tn stsrnum 'svn ',ii+1 e 8@(l30:(0>from stsrnum 'svn ',ii+1)l30.@ (STS[7]moreG ( nulelore 6(l25:same0 P(io1(@((STASKMODE'last')0 (Xafrom stsrnum 'svn''',toid,'''' what do we look like from there?X  (' 0( 1st get/set svn over there0`-(( ('%$,ASK(((4(rstget;wait;any80(((H(r1>STDATA[n;io1](8(( DanB 960208 get value from shared var80@( samesd[,from;3]toidsd[,n;3]0@signal(any^0>waitwait-1)102 waited enough?@@X(anywaitSTmaxwait interrupt after that long@ H(stimmexec"@ 0a(l10:(11svs STASK)get 1 [08( 'no shares' signal(2svo STASK)1108 (streattach@ (rvarn0@  (911&(anyP( acc is account:password/site - we get those in sequence ifn).PP( not provided (only password not defaulted). io 1 assumed.acPP(,( in some cases we can find out directly by asking svn to tellP8x-(doneSITES[sn;3](SITES<0)[SITES[;1]site;3] siXPx,( us from the name, in some other cases we need to establish a'PP connection (with svn again). SITES shows us how to do it:TESPH-( buffer flushed or not; STS will contain that info:H i28;(simple:site>SITES[SITES[;2]site;3] ]8HE (4 ,s89:;0 1 <=T] Hmpedone clasimple lihsnmmuni@5('unknown site' signal(siteSITES[;1],<'')111@@8+(l20:(site<'')end forget finding svn #sn;3@8(6(l10:pwstblot 'Signon/password:' 3] ;2880( we are to find the remote id number.8(( svp 1 3 1 1 07] s( (r[0]a-2221=a * j <ccHBV(0V(r/x,V(f ,V(un.V( m4V(l1(2V(t HMV(ssMV(('GV( [LV(':81V(-1/V(vWV(0:^V()ҘJV(etIV(svBV( siCV( n1V( sixOV( ndHNV( n5V( wEV( inx1V( te-V(. 1V(so-V(e p/V(ut/V(by(FV(vnh5V(16BV(m 5V(in4V(r h-V(eep0V(liPFV( .V( ( 9V(agPCV(S QV(ow HV( [ a  80(break:'' @dFn 0m( at this point we're on lineTE0io1 <(pw `( acc(v-1)pw p(site (get:rSTASK1 0c(0 svn '' clear commsite=(0Pvsite''svn site,accpwsvn 1 clone id better be setk rPPes 's result is # cpts transfered, CPU & time (milisecs)rtP3'j <1uV(GV([2(:V(orOV('(;V(st:V( [`GV(s =V(veFV(g h:V(29p[V(s @;V( fixHV( en8GV( ldH=V( r>V(uc=V(di?V(ceP?V(te?V(n HHV(eaXSV( dOV(sfV(&'>V('cr5V((prH@V() tQV(*rhAV(+tsAV(,e (IV(-hiV(. MV(/to(V(H-( the system id and then in SITES for its local id.m'lHomlcantnd @ NSVP loopback is sometimes 21 - convert to 1@sr'Rrase 'r )wait',47 Qnt:r'r  readn elt limsfin P( v(nv)vE um'frtie',nwtotiene@U( DanB 2002 send file to [remote] accountsultt@@U(r'** Not done: TO & FROM tasks are the same'cr@@V(limschkerror from stsr read,'stie ',frtiets@XV(file'/= /wait /newname= /to= /from=' parse file ' ' before filenameXXY( if any of these tasks are 0 (the parent task) we refuse to do it 0 ',X@pW(lims 0 1 +2cptfrom stsrnum 'size ',frtieo@(( STASKMODE'gather') W(@W(chkerror to stsr '(',cpt,') stac ',toties but@@Y( Looks like we have everything in hand.owedit@H8X(frtiefrom stsrnum r'((1+nums)0,nums)0'SansfeHH0Z(from stsr 'untie (/',read,'names,'' '')nums'r 'H8@b( toto default stcurtask and after8P`Y( find a suitable tie # for the file to transfer a copy oftionPXZ( untie the file if tied using the ' 's around the filename for ENd>'sXP`a(cptQ,newname,' ',(/2cpt),Q'''' file and size to use',P@Y(rfrom stgetsvn to we must ask this now sta@@b(to stset totie,R,' ',to stgetsvn fromt is @HxZ(newnamenewname default(+/^\file' 0123456789')fileHH(rchkerror to stsr cpt,'create ',totie,' ',1limsom HXxb( create the remote file accounting for any missing 1st components 'obXPa(totieto stsrnum r suitable TO tie #PPb( At this point the files are opened. We could use toP@(from stset(frtie,' ',lims),' ',S,' ',rrtie@8d(trap'721 c cant' catch errorh8X c( transfer individual components but its overhead would slow downfXP things too much. To expedite the process we create a functionPXxc(0r'* Transfer started (don''t forget to pick up result later)'YXX If wait is requested we wait until the tasks complete and clean up:eX0@<( establish communicationine0Hh(rstfindsite acc;svp;v;r;trap;pw;site;same;sn;ioF(H&(sd8`E( on each task to do the transfer.fter8 ( l20 all set 0xf( S'sENd' the fns to use[0 80(sendbreak[2 0 (svp[1;1]v-2221=vsvn site1 [0X Blot for account number/password if '' or account does not matchme)X 3(STASKnam' 0( 9583,(from),'',to0Pt assumes var is contiguous and homogenous (no or arb)+0P j <`EV(V(PV(B((DV(0 V(V(B(V(A(V(V(8V(0( 8783,(to),'',from 0(( rav[xlstring]bJ((%(rn stwhatis var;l;io(0((9292-scsc1)63,410 (R'rECe'  80( pwvpwcc Fn 0( retie and find its size[990(((vi acc)simplexfrna((( done for nowxfrun(((stexec 00;trap;stexec( ( ellast (P(fromfrom default 00((P(stedit 91;er;stedit39(( ( sitetoid a H(to89+((089)>0from)97stcurtask89fitoe?H d( acc(v-1)acc 8( allrtoHj <erp!V( !V( s`V(tV( [H0H( (STASKMODE'gather')show 0(( (same':'acc)l10 (l,Li19m/r uaLi18o bl Li17 ce oLi16bed saLi16 [4e Li15lxs'Li1499<OLi13pva 9Li12 pck5Li11i6 amsLi10seLi9' p L1Li8ntie9 Li796  Li6 HȦ(r1Rrto stsr 'fx ',(r),'',quote,rcr Rs'F(HP(stdel0(f(10 0 1ai),12' ucmds' >10 ( acc(v-1)acc pj <e V( V(s V(sk0 V(mmXV(cuh V([2V(0)r p ((accdblacc 8(l10:fx>('stedit;',91)'stdel 91'sk8 ؟(newnametedt 8( vacc'/' w 00 @(from 8(stgetsvn @ (91 <(vpw':' acc ( ( prepare each task(Xx( simulate user command processor - can be erased from ws V3.051MITERS:X8(ru c;trap;f;t;ucmd;MT;erR: AN88(10:(t(names^.=f)/nums)50dFn [8 l(moreaout? ( (':'pw)l20 0d(cptr,'ai[io],1 0 ',cpte [0x(io0 sameS-aLi5brks 'Li5rsioLi4L(Li3H-(0Li10!((00 h( (t<0)l20@ (ppdef f u P(( This fn is brought in the ws the 1st time a user cmd is usedP ؟(waitwaitrom ( ((r'020(Hdj <e ZV(UV(mmTV(la(TV(l2H(H(done:svp[1;1]site0 B(((j <o U(XU(seXU(apU(nb(U(nd V( cU(sk0U(k pV(asxU(ra`U( sU(okxV( [8U(K,U(),U(ok(p (*s)F(xE(((H( ]varcmd accepted6((ssonodelge 7 lib1 99ns1new 2lntdelLinuHP(r 1 3 +, 0 3 cptfrom stsrnum 'rdac ',frtiefileHH(30:trap'22 o e ''ucmd file not found'' signal 22'(H( 0(( '** Invalid name' (0(r''fi(STprefix)STASKumber0@p( that didn't work, use general UCMD file:spar@ =(l10scsc1 0( DanB 1997 current task number0 50 H ( (00`(j < V( V(t; V((V(daP V( U(seV(tP V(g `@(f(4nc 1f)/f(\''=c)/c,c om@X50:'invalid boot fn' signal('ucmd',pnames fread t,3)11av [1X@( MTt MT is the Main ucmd file Tie #AT@P(1=f)0ct ucmd(+/^\' '=c)c is result being used?;sPP((c(\~c' ]')/c)0r 0 0 0ppdef 'ct' pack 0 usedP@]( danb 20020401 are there any pending tasks?)0@X'** some local tasks to be reattached: ',n,(0,STprefix)v,' ' boutX ( rr,6nvar  00K(f' 2970082 ucmds ' 2:0 @;(vacc':' l20 Pissl30:trap'2 e er''session suspended, 0 to resume'''te [P 1j <] ZV( YV(ac@V( YV(PYV(inp\V(VPXeV(naeV(NSPZV( pbV(le`^V(8aV((XV((00 (sr02(0(0/( t1 accept 'srab'((((4nc 91)l10 obJ[B((@l10:'Suspend, Resume, Attn, Break ? ' erSITE@ `(stcurtask"@ (rstcurtask 0(b(rstcheckbreak;t;trap;ertion0 S( (t'bB')0 ( n/0,tfi n (( (c(f)c)03/25(#(stbset(i (V,'W( = ('E ?(stcheckqsp@ (remote: 8*(stfilexfr"@ @(0 if tofrom ((trap'o d exit'(@ danb 85 send a break to the s-task (3 attns)?@H`( preceeding line only valid with non 3270 terminalsF(H0(stbreak(sENd(w(r'signal 106' obJeak(H-( stattn (l40:talk@dFnk  0(stattn 1j < rhaV((bV(s aV([1XhV(608^V(t PaV(traV(ST hV([2 ^V(esXbV(nt(_V( hjV((n_V(b)@sV( rhgV( ] dV( S_V( S0`V( `V( r `V(l^V(5]n- ؟( pwvacc set L( 0put(( (223runs)l0 (( ( ('sSrR't)/2/l30,0 (szjrcjbsa@zav[(z0)/z] remove nulls from result@XE(l0:a(-' 'Ţ1a)aoutput device attribute char to replace last blankXXF(b(arbin 240)[27 28] number of rows and cols for this deviceputXX`F( and 1 col past (following line), write input as z-codes, non-displayXXF( attribute, cursor at start of buffer (16) & write nulls (254) in itXXG(z34arbin(246), 13 194 4 ,rc,3,c,a, 6 76 16 9 ,sz,254 get inputXXfsmrdt,sowrt,wcc,sosba,r,c,soz,cnt,ztxt,sosf,att,soic,sora,r,c,0blankXH-( l10P( output8pH(zstblot output;a;b;c;io;bs;rc;szBS 8 g(stcheckbreak 0hL( show a blot to hide input08C(arbout 020/'H',bs,'X',bs,'O',bsBS 80 ( U" 0o0  h/(r'',11lc 0 f( CR-LF reversed under SAXAX0(d(delstsetcloneidp)end((p=(remote if 0vsvq 1(2/getbs,'B check ] lloop-' tptindevicchrwaitepl@ H((nc 'NSVPid')l1 has this been done yet?l@XI('invalid ''NSVPid''' signal(21svn NSVPid)111 test disabledew>,XXxH( check sp to determine if any code must be executed upon )loaddel> fXL(stblot` write to existing screen (13),C,set buffer adr at 3 lines above bottomxP`0e(stcheckqsp;trap;id;io;del;new08E( also condition ws to work properlyn8 p( (t'aA')0c 0(stbreak HL( dl 0.25 dFn (C(r'signal 105' F(C((`(j <XoV(pV(e`fV(aunV( gV(t gV(=i`(( ( trap'22 o e 30' [(@( danb 85 send an interrupt to the s-taskk;5]'@j(stbgetHe( if the globals aren't set properly it won't worked?H(stattn0{(STASK,'xlt[io+ 0 0 2 0]'cess0 m( stattn @ X( szb- 0 1dFn X ( @ xlt'Sav' default 'STav>STDATA[stcurtask;5]'@ ~( dl 0.25   (xlt?( z  (rsignstaskai G(io0 PctaNSVPid>SITES[SITES[;3]<1;2] this is the actual sitel1: cPP which site are we? use loopback data (21) to find out:alsP@F( has executable code been passed thru sp?@@=( set pw for appropriate session managerlly)1@@](SITESSITES'here'NSVPidآ1''fi 2 ws 1sp @X3(nodel:'** unable to find file - )edit command unavailable' XPa('SITES[i;3]SITES[i;2]' fori 1SITES(PHt('Multiple S-task workspace version ',STversionE(H((signon(`Z(c, 0 256 aavaJ(0(( wait1 we WANT to waitxec 08h('no shares' signal(2svo STASK)110 8Xpw 79 99 79 99[2 25 7 runs[1;3]] 2=IDSH, 25=telnet, 7=LinuxX]  l70 notconoutot o(Hk( LFav[160 11[1+SAX]]((4]Savk sie eid imm o eunix to[1Tnomsg'odoneouttinnbke' unioutput]ndsvpwe cST[accut r tmoderocpG(io1 ((t((4 ws 'sp')end reak(@ 0s !0!#1$T-@h($ (V H?&$%D !Y!"&'o+Fnh8x( sign-on (new s-task) using globalFnro8H(0:agePM( if the ws is )saved immediatly after setting those globals''P08o (   0 (io1 H(io1 ( r'' @( DanB 970713  00A(((ai[3]-in (((tie rECe from;x;c;e????(({ ((((check:scsc0.3 J(8 ($I !Yoop 8STSc 0d('* ''NSVPid'' has been set.' 0Hu(SITES[;3]<0 get rid of any previous info, if anyof)H (rECe@ check by noting the time between set/get:h@ ( e(-io-9)0e 0( fn used by d08h(1 svc 'x'(1 3 from) svo 'x' dFn 28 ((waitcheck 0`l('* ''SITES'' has been set.' 0 H(rcb+ 3 1  0?(trap'86 c lib1' for SAX0 `(STASKMODE?? ((l2:xc appendr tie ((((r1'''''',(1+s'''')/s((8( (2pnames cx)l2 (((rstbget;wait;io;in(Hh(l3:'last component received was ',1+12size tieF(Hx(quote ( inai[3] 0( double the quotes in sHuC(0p](rstfilexfr file;newname;from;to;totie;frtie;io;lims;read;cpt;Q;trap;wait;R;S;STASKMODEpH(( We wish to wait no longer than 1 second for the data.HH(l20vex loop(t(STdelfile' 7 del ' '(PYall:n10,n/n2=svo STprefix,1 'li2' fmt1STDATA P(k( (STdelfile)l20reak(((CRav[157 14[1+SAX]] s((`m( STdelfile' 1 del ' ak((t((1dellib 1)nodel (Zalldl00d((l0:(2=svo 'x')l1 E((P nn[n,n] scalar 0 means everyone, this task includedP H(roff n;trap;t 0(l20:(0n)/trap'11 d off'l08( )off task n - if 0 )off them alldFn8  (% 0(r'' Default value for all0 l1 j(del' del ' .(l00:(n)l20 ((rsignon1ai  ( 0??See 'STdescribe'0( tl20 X ( (ec)l3)0 ((l1:(2=svo 'x')l3 2 ((8d( (1dellib 7)lib1'( x(get:rSTASKFn HX(STDATA[t; 1 2 5 4]>(t)/<0''0SITES[SITES[;3]<1;2]H(lower8(r[(r'A')+26]26(r'a')rav k dFn(8 X (rquote s@% 0Ȓ( DanB 970703 lowercase of 's'(0 (signstask"@ pj <FV(8QV(eaGV(anxYV(a TV(heSV( ahMV( dp ( l0,sc h( t1n  j <(wV(x|V(1 xV(dehxV( FhV( pwV( nxV(1]{V(as`yV( )V(llV(' (vV(t V(alwV(00 ('s10xj <v)xeV(gV( [V(er\V( gV(70HgV(e eV( \V( x(from`H( new0 ????This is the usual licence agreement between you, the user of this collection of programs in this workspace, and me, the owner/creator of it. You can use it but not resell it, packaged with something else or not, even if modified. You know there may be problems with it and agree to use it "as is". In other words if it fails YOU take the blame. On the other hand I will try to fix problems reported to me. /DanB /DanB @B(l00n1nap;t (Enter (see STdescribe for details) )edit obj to edit 'obj' using )exit [n] to exit to parent ws or go to task 'n' )out to o-u-t from )xfr O /t=n to transfer 'O' to task 'n' (or parent ws if elided) ) exp to execute expression in parent ws ]command to execute a user command (append '&' to perform in parent ws) To send a line without waiting for input use '&' at the end. end. j <??H*V(V(de*V(:@+V( t+V(l2+V(t +V(' TV(nH5V(al҈0a (?0000@j <ЂV(PV( V(xU(HV(@H('** task 55 not in immediate execution mode'89 98(HH(stsrdcondHg( then this fn will not attempt to change them again.E(Hk(if A(rwhat if cond  (note  ( rr[avs]% whatX8( DanB 960208 get value from shared var. If not ready return ''.hXX sc does not return whether a change occurred. Instead we mustX@`(fx>'F N'EXP'',(i<0)'1N-ii+i'@ ( Nio,N-~iori H (  (licence (rt stsr ')off' x 1 Y Y is aHere is a basic example of use under linux. On each line, if the 1st character is < it denotes input, > the output. Assume user ID (1ai) is 789. First signon one task: < signstask >2 The two elements result is: 'error message''signon output'. Under some systems the initial signon message maybe quite lengthy. It is not shown here. Let's 'talk' to it: < talk from now on we'll be in mode. The task #/userno shows up >* Task 1 -> 789 linux -- )help for HELP > [signon message appears] >clear ws < )wsid >is clear ws < )exit >** back in parent ws We're back in the parent ws. Let's see which S-tasks are signed on: < tasks >1 * imm,prompt 789 linux 0 Only one task is signed on through this interface. It is in immediate execution, with standard prompt. Task ID is 789. The star (*) denotes which task is the current task (there is only one now). The system is "linux" and the translation is 0 (none). < runs >123 789 7 0 65 560 0 0 >234 789 789 0 0 0 0 0 There are 2 tasks running on this account: the parent and the child. The parent (id=123) has been started by the system (id=7), has used 65 CPU units, been running for 560 seconds, while the second (task= 234) has been started by the same account 789. Both are T/Stasks as shown by a 0 in column [;4]. Let's start another task: < signstask discard result < stsend '2+2' ask the new S-task to compute 2+2 >4 < tasks >1 imm,prompt 789 linux 0 >2 * imm,prompt 789 linux 0 Task 2 is the current Stask. Let's talk to the first one: < talkto 1 we'll be in mode until the )exit pseudo command >* Task 1 -> 789 linux -- )help for HELP < )wsid >is clear ws < z3*3 >27 < )exit 2 >* Task 2 -> 789 linux -- )help for HELP < )vars < )xfr z /from=1 < )vars >z < z >27 < )exit >** back in parent ws We've transfered successfully variable 'z' from task 1 to task 2. We can signoff the current task by sending < stsend ')off' < tasks >1 imm,prompt 789 linux 0 >2 * imm,prompt 789 linux 0 See the down arrow () meaning task 2 is 'off'. There are more flags, see 'describe' for details. Let's start using task 1 in non interactive mode: < task 1 < stset 'adl 999' ask for long process to start This fn does not wait for an answer. We can break it: < stbreak < stsend '9-5' let's do something else >4 Let's enter interactive mode: < talk >* Task 1 -> 789 linux -- )help for HELP Assuming the file is available the following should also work (if you've never heard of user commands skip this section) < ]unames cmduc* >cmducomp cmducopy We return to the parent ws: < )x >** back in parent ws We now use the function to terminate this task: < off 1 signoff task 1. Using 0 would signoff the parent. >[signoff message] >** task disconnected >** back in parent ws /DanB2001 NUx (rcond/what B(i2(M(3:((1N)ū-/2N)0 ((xn( F 11N restartable( H( i''Ң1Non  j <V(V(V(U(0V(xU(V(PU(pV(U(V(U(V(`U(V(8U(V(U(V((V(HV(0P^ (&e0(j(EXP fori N;F;i;i(]. 3's stX DanB 951203 will EXP for i:=N[1](or io) to N[2] incr by N[3]ew S-tXH(loop:(svs STASK)[2]get var is set, go aheadE(H-(fori@HI( (if unable, 'NSVPid' should be set manually)p@X( if the last transmission was not arbin/out then flush output bufferX00( DanB 96 Check Break condition0  (rlower s;io (M((2 3 N)/2,3 obJe(( (io0' Rs6''Hj <TAzV(HxV( rtV(1]sV( tHXy(default0(stset(')'=1acc)')',acclear':0Pj <V($V(ak&V( p%V(re$V(;̨%V(Da*V(k &V(it8V(10@&V(d,X"V( tt0%V( '*V( hIV( ab&V( ')V( ' %V()(V('0'V(' H(V()҈PV(')V( X0V(t)(V( `)V(30P2V(2 P0(outputoutput,Tno stwhatis v 0((unixl30output''J(B(exampleH j < 3V(V(x1V(8 8V( NHHV(SavSTav unix used to decipher output in various fns(H(dbl8(( danb 83/10/12 SQeeZe out extra spaces8 (sdbl s;w@dbl 00(s1(w1ws=' ')/s' ',s 3030(off R(2:NN,1 (copyrightobJ @(STASKMODE'gather' gather all outputstb@Hj <ȞV(@V(D(PV(nHV(E(H((r7 signon1ai rr d(0ؙ (c) danb 1990+0 8 (%% h (% Hj <x1xFV(RV( sHV(1] UV(3/H@HF(cant:r'***',4,1er return error as result@ x((0n)all ff'  l00 (01H`(r1Srfrom stsr 'fx ',(r),'',quote,rcr SH@(to stsr ')erase ',Rfrom stsr ')erase ',S @ h ( (w`j <??pV(V(78zV( fV(ihzV( 3V(3 `P???errors'file ''ws ''not fo''interf'' full''error''er lib'P`?j <??V(V(??V(??ؚV(??V(??V(??`((string signal 721?????(0 (stringchkerror string;errors??0`t( DanB 19970717 bomb if string contains the word 'error' in the 1st line` `(clearstask@ (stringeEx80((1errors><(stringCR)string)0Fn8 h(chkerrorsrn (j <D(U(0U(D( U(D(@U(tU( [U('(U(0 U(' XU( U(F9HU(1 U( rxU( fXU( meU(;t;(errors P(stbreak rECe @ sign-on (new s-task) & ensure in a clear wss @ @ ( (02 8(rclearstask X Pf( pdef sp13n ( stcheckqsp(8XhX(mode, 2 2 2 2 2mode 8=no pw set; can be issued as boolean listmX  X(doneoutnbk0 o-u-t signalled, number of BREAKs allowed.aX(00i''N h(sts'imm mode,blot,not signed on,ready for input,cr reset,arbout,prompt,output,' dFnh2.ؗ-&$ "8!PhH(rfrom stgetsvn n;same;i;t;io;sd;a;STASKMODE;toidF(HH(stgetArgobrclfasraddwRbIndhandlerec9899MFNEXPW89W78W85W82W79W80W88W86W81W84W83W87W92W90W91W93W94W95vAlW96W97W98vaLueW99l4l3chkcompmemcmmErDswitswspqXfrIDt2nLlxlatetIErEfoNSinWsbUfArG x(readBuf opfilehdl (replace l7l5rDbuftoreadxFrX87X88X89X90X91X92X93X94X95obJX96dFnX97X98cOdeX99l2jtnofnazendamshownolistokamsfszreprngcpttieargobjmsgstrDl05l01b1sourcedlml160l130l120matl60line1line0comcrfnl50l40l30l20l10CupUvpossslmasknispWbl1l0lbrtSTxfrtoclose create writeall copyright describe foriformeparse version xfr xfrfrom blksize XfrObjs openreadXscreate(infile(boutfopen(nameof equivalence H(txtrepld (fixddV( V(`V(V(V(V(V(V(НV(V(V(ПV(V(V(V(ȡV(U(V(V(؂U(V(hV(PV(8V( V(~U((.,**_(             $  []();/\+-*^<=>,!?~_ܭ}{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789. ':  |`#@"%&徼е뱿    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     йV(   hйV(V(V(xV(XV(@V((V(V(V(V(ȸV(V(V(hV(HV((V(V(V(ȵV(h(xlcq:(pat!e:(d4patnparms%9798;F99NaM_GCodTtrans?rangeqobjslistfiledebugmcRasciiYaplnoamd]aRXt~Oz|80lT*vuqoymlkwwUQ.3+r7cY4N@`,