/* Rexx --------------------------------------------------------------*/ /* Get a file from a remove system via an IOF server session */ /* */ /* The data set will be transmitted via the XMIT command to the */ /* current session. A RECEIVE command will be executed after the */ /* transfer is complete. Respond to the RECEIVE command prompts */ /* to determine where the file will be stored. */ /* */ /* The default server is server 2. This can be changed in the SERVER */ /* parm below. */ /* */ /* Examples, from an IOF session: */ /* */ /* %SVGET TEST.DATA retrieve TEST.DATA from */ /* server 2 (default) */ /* */ /* %SVGET 'SYS.JOBS.CNTL(BR14)' SERVER(Y2K) retrieve member BR14 */ /* from server Y2K. */ /* */ /* %SVGET SYSEXEC USER(JOEUSER) PW(JOESPW) retrieve SYSEXEC from */ /* server 2; specify user */ /* and password. */ /* */ /*--------------------------------------------------------------------*/ PUSH -1 /*-------------Parm Description-------------------*/, "DSN" /* Data Set Name to XMIT. */, "SERVER(2)" /* Name of server where file currently exists. */, "USER()" /* Userid if required on server */, "PW()" /* Password. Required only if userid specified. */, "TEST" /* Trace exec if TEST is specified */, /*------------------------------------------------*/ parse arg arg_list /* Process input parms */ interpret IOFProc(arg_list) /* Invoke IOFProc to process parms */ if rc > 0 then exit /* just like clist parms */ if test = "TEST" then trace 'R' address IOF sparms = 'CMD(*)' if user \= '' then sparms = sparms 'USER('user pw')' 'SERVER' server sparms ' CLIST' 'JUMP CURRENT' tusid = sysvar(sysuid) 'TSICOPY NAME(A19NODEN) TO(REXX) FROM(SESSION)' 'TSO XMIT 'a19noden'.'tusid' DA('dsn')' 'JUMP CURRENT' 'EXCLUDE WTRID NE 'tusid 'TSICOPY NAME(ROWS) TO(REXX) SECTION(PANEL)' 'SC SS WTRID('tusid')' rows 'SNAP' 'SNAPCLOS' 'PAUSE 200' rows 'CG' 'JUMP X' 'JUMP CURRENT' 'TSO RECEIVE' exit