Google
 

Trailing-Edge - PDP-10 Archives - tops10_integ_tools_v4_10jan-86 - 70,6067/com20a/cancel.com
There are 3 other files named cancel.com in the archive. Click here to see a list.
$! CANCEL.COM
$! GMU 09-Aug-83 11:54 Version 1.01
$!
$! This command file emulates the TOPS-20 CANCEL command for print and
$! batch queues.  The command syntax is:
$!
$!	$ CANCEL queue-name job-number
$!
$! where "queue-name" can be one of PRINT, BATCH, or a VAX queue name.
$! The PRINT and BATCH keywords are turned into SYS$PRINT and SYS$BATCH
$! respectively.  Keywords may be abbreviated.
$!
$! "job-number" is the number of the job in the specified queue.
$!
$ save_verify := 'f$verify(0)'		! Save and turn off verify
$ delete := delete			! Make local symbol to undefault
$!
$! Check for the presence of paramters and prompt for them if necessary
$!
$ if p1 .eqs. "" then -			! See if no queue name given
$	inquire p1 "$_Queue:"
$ if p2 .eqs. "" then -			! See if job number given
$	inquire p2 "$_Job number:"
$!
$! See if the first parameter is PRINT, BATCH, or an abbreviated version.
$!
$ p1_length = 'f$length(p1)'		! Get length of queue name
$ if p1 .eqs. f$extract(0,p1_length,"PRINT") then -   ! check for PRINT
$	p1 = "SYS$PRINT"
$ if p1 .eqs. f$extract(0,p1_length,"BATCH") then -   ! check for BATCH
$	p1 = "SYS$BATCH"
$!
$! We now have all the necessary information.  Do the appropriate delete
$! command.
$!
$ delete/entry='p2' 'p1'			! Delete entry from queue
$ save_verify := 'f$verify(save_verify)'	! Restore verify