Google
 

Trailing-Edge - PDP-10 Archives - tops20tools_v6_9-jan-86_dumper - tools/com/do.com
There are 3 other files named do.com in the archive. Click here to see a list.
! This procedure runs the command specified in its arguments 
! in the background.  ie, puts it in the batch queue.
!
!To use, invoke the file and put the DCL command which you wish 
!to submit on the same line 
!
!the job is submitted with jobname = the dcl command,
!
!processname = 
!    (your process name)||(the dcl command)||(a number for uniqueness).
!
! You are notified of successful or unsuccessful completion via SEND,
!
!and the LOG file is left in the directory which was your default when
!you submitted the job.
!
! Do not submit jobs which access the line printer.
!
! Note that if you are executing from a different disk, then the 
! log file WILL show up in your ROOT directory.
!
!
$ again  :== "''p1' ''p2' ''p3' ''p4' ''p5' ''p6' ''p7' ''p8'"
$ defdir :=  "''f$logical(""SYS$DISK"")'''f$directory()'"
$ user   := 'f$process()'
$ !
$ if "''f$ext(0,1,p1)'" .nes. "@" then lbl := 'f$ext(0,8,p1)
$ if "''f$ext(0,1,p1)'" .eqs. "@" then lbl :=  indirect
$ !
$ on control_y then goto cleanup
$ open/write tmp b'lbl'.com
!
! put logfile from the batch job into file []jobname.log, rather than 
! printing them on the lineprinter
!
$ write tmp "$ set noon"
$ write tmp "$ set process/name=""''f$ext(0,8,user)':''f$ext(0,13,lbl)'"""
$ write tmp "$ set def ''defdir'"		! Set default to proper directory
$ write tmp "$ ''again'"			! Execute command
$ !
$ close tmp
$ !
$ write sys$output "& ''again'"
$ submit /noprint /log='defdir' /notify /name='lbl' b'lbl'/delete
$ exit
$ !
$ cleanup:
$ close tmp
$ delete b'lbl'.com.