.; ETXCMD.IND - An IND control file to permit "wild-card" file .; transfers for ETHERX.SAV. .; .; The file is invoked by IND ETXCMD P1 P2 P3 P4 P5, where: .; .; P1 - The ETHERX Command [/ETHERX_switches] .; P2 - The Input Filespec [/Directory_switches] .; P3 - The Output Node Specification .; P4 - Execute switch .; P5 - Delete switch .; .; ETHERX_switches are switches to be applied to the ETHERX COPY .; command, such as COPY/ASCII. .; Directory_switches are any legal switch for the DIRECTORY command. .; This allows filespec selections such as /SINCE:dd:mmm:yy. .; If the Execute switch has the value "EXE", the command will be .; executed; otherwise this procedure will only build a command file .; to be executed later. .; If the Delete switch has the value "DEL", the .COM file will be .; deleted after execution. .; .; See the documentation file ETXCMD.DOC for examples of how to use .; ETXCMD for uploading and downloading files using ETHERX. .; .; It is necessary to assign some device to be WF:. .; It is necessary to have the file PARSE.IND located on SY:. .; .; Written by: .; R. W. Barnard .; BIO/Comp Applications .; P. O. Box 18007 .; Albuquerque, NM 87185 .; .; Version 1.08, 3-May-88. .; .enable quiet .enable global .; .; ******** Start of User-Changeable Setup Parameters ************** .; .; Edit/choose the following to reflect your circumstances: .sets RUNCMD "run ETX:ETHERX" .;RT-11 SJ or TSX+. .; .sets RUNCMD "VBGEXE ETX:ETHERX" .;RT-11 XM (Bkground only). .; .sets RUNCMD "run ETX:ETHERX.XM" .;RT-11 XM only or TSX+. .; .; ********* End of user-changeable parameters ********* .; .disable lowercase .disable prefix, suffix .enable escape .; .sets $DEFDV "" .;No default device. .sets $DEFXT ".*" .;Any extension. .sets SKPCHR "~" .;To specify only one file in UCL mode. .setf INTRAC .;Indicates if input has been interactive. .sets ENDETX "EXIT" .; .testdevice WF: .test "NSD" .if ne 0 .goto nodev .; .start: .sets RAWCMD P1 .;Get the command if not entered on .if RAWCMD ne "" .goto p10 .;command line. .asks P1 Enter the ETHERX command [/ETHERX_switches]: .sett INTRAC .goto start .; .p10: .parse RAWCMD "/" COMAND CMDSWS .open #2 WF:'COMAND'.COM .data #2 'RUNCMD' .close #2 .; .if CMDSWS eq "" .goto filesp .sets CMDSWS "/"+CMDSWS .;Make the switch look like one. .; .filesp: .sets RAWFIL P2 .if RAWFIL ne "" .goto d10 .;Get the input file. .asks P2 Enter the input filespec(s) [/Directory_switches]: .sett INTRAC .goto filesp .; .d10: .parse RAWFIL "/" FILSPC DIRSWS @SY:PARSE.IND 'FILSPC' .if DIRSWS eq "" .goto d20 .;Save these switches to apply to .sets DIRSWS "/"+DIRSWS .;the final input filespec. .d20: DIR/BRI/COL:1/OUT:WF:CMD.TMP'DIRSWS' '$FILSP' .; .target: .sets OUTFIL P3 .if OUTFIL ne SKPCHR .goto t10 .;No second file. .sets OUTFIL "" .goto t20 .t10: .if OUTFIL ne "" .goto t20 .asks P3 Enter the output node specification: .sett INTRAC .ift .goto t20 .;No second file. .goto target .; .t20: .sets LLINE " "+OUTFIL .;This is the output filespec. .; .openr WF:CMD.TMP .read LINE .rdloop: .read LINE .test LINE "." .if eq 0 .goto execut .;We have read everything of interest. .parse LINE "." FILNAM EXT .test FILNAM " " .if eq 0 .goto t30 .;Need to trim trailing blanks. .sets FILNAM FILNAM[1:-1] .; .t30: .sets FLINE COMAND+CMDSWS+" " .;This is the command. .sets MLINE $DEV+FILNAM+"."+EXT .;This is the input string. .sets CMDLIN FLINE+MLINE+LLINE .opena #2 WF:'COMAND'.COM .data #2 'CMDLIN' .close #2 .goto rdloop .; .execut: .sets DELCMD "" .sets DELETE P5 .if DELETE eq "DEL" .sets DELCMD "DEL/NOQ WF:'COMAND'.COM" .; .sets CTRLC "" .;Only needed for SJ. .if ne "RT11SJ" .goto e10 .sets CTRLC "^C" .;The only way to stop ETX under SJ!! .; .e10: .opena #2 WF:'COMAND'.COM .data #2 'ENDETX' .data #2 'CTRLC' .data #2 'DELCMD' .close #2 .; .close .iff INTRAC .goto e20 .ask Q Do you want to execute this command now [N]: .ift Q .sets P4 "EXE" .; .e20: .sets EXECUT P4 .if EXECUT ne "EXE" .goto e30 $@WF:'COMAND'.COM .goto e40 .; .e30: ; ;The file WF:'COMAND'.COM may be executed when you wish .; .e40: DEL/NOQ WF:CMD.TMP .; .exit .; .nodev: ; ;The device WF: has not been assigned! .exit