d$! DO SPOOL {single command} $! Submit a single DCL command, or a DCL command series ,$! $! The job will send back a completion message $! The difference betweeen this and the SUBMIT, is that: X$! $! 1) It generates the file on the fly. $! 2) It waits for previous jobs to be complete. $! 3) It sets the default to your current default $! 4) It sends an: OK or *ERR message L$! $! ..note.. uses the file SP'lnum'.VX,SCI_USR:SPNUM.VX $! The command file, SP'lnum'.VX will be deleted if the program $! terminated O.K. $! ..note.. uses SED.com to create the file x$! $! -end.of.info- @$ $ term := 'f$logical("TT") $ l$! ... Determine number of SP $ 4$notno: $ lnum := "OOL" $ open/read/err=nosyn SPOOL SCI_USR:SPNUM.VX ` $ read SPOOL lnum $ lnum :='f$extract(6,4,lnum) ( $ close SPOOL $ $nosyn: T $ open/WRITE SPFL SP'lnum'.VX $ on control then goto nosub  $ $ WRITE SPFL "$ on error then continue" $ if(lnum.nes."OOL" ) then WRITE SPFL "$ sync/entry=",lnum H $ WRITE SPFL "$ set def ","''f$logical("SYS$DISK")'","''f$directory()'" $ WRITE SPFL "$ on warning then goto sperr" $ t$ if( p1.eqs."" ) then goto multi $ WRITE SPFL "$",p1," ",p2," ",p3," ",p4," ",p5," ",p6," ",p7," ",p8 <$ goto gotcmd $ $multi: h$ write sys$output "Input SP file, /WR terminates, / gives help" $ @SCI_COM:sed SP $ 0$ $gotcmd: $ WRITE SPFL "$ do send ",term," SP",lnum,".VX fini" \$ WRITE SPFL "$ delete SP",lnum,".VX;*" $ WRITE SPFL "$ goto spfini" $$ $ WRITE SPFL "$ sperr:" $ WRITE SPFL "$ ierr := '$status" P$ WRITE SPFL "$ assign SPerr.vx for006 $ WRITE SPFL "$ do error 'ierr" $ WRITE SPFL "$ deass for006 |$ WRITE SPFL "$ open/read err SPerr.vx" $ WRITE SPFL "$ read err line D$ WRITE SPFL "$ close err $ WRITE SPFL "$ delete SPerr.vx;* $ WRITE SPFL "$ do send ",term," SP",lnum,".VX *** 'line" p$ $ WRITE SPFL "$spfini:" 8$ WRITE SPFL "$ purge SCI_USR:SPNUM.VX" $ $ close SPFL d$ $ assign/user SCI_USR:SPNUM.VX sys$output ,$ submit SP'lnum'.VX $ write sys$output "SYS$BATCH has job SP",lnum,".VX" $ exit X$ $nosub: $ close SP