HP OpenVMS Systemsask the wizard |
The Question is: How can I get the entry number of a batch job on a queue using F$GETQUI? The Answer is :
For the current job (ie: self)
$ clear = F$GETQUI("CANCEL_OPERATION",,,)
$ entry = F$GETQUI("DISPLAY_JOB","ENTRY_NUMBER",,"THIS_JOB")
example scanning queues:
$ start=f$getqui("cancel_operation")
$ nextqueue:
$ queuename=f$getqui("display_queue","queue_name","*","all_jobs,generic,symbiont")
$ if queuename.eqs."" then exit
$ WRITE SYS$OUTPUT "Queue: ''queuename'"
$ nextentry:
$ entrynum=f$getqui("display_job","entry_number",,"all_jobs,freeze_context")
$ if entrynum .eqs. "" then goto nextqueue
$ user=f$getqui("display_job","username",,"all_jobs")
$ WRITE SYS$OUTPUT " User: ''user' Entry number: ''entrynum'"
$ goto nextentry
Existing discussions of the f$getqui lexical include the following
topics: (813), (1240), (2159), (3951), (4546), (4568), (4903), (5188)
(5471), (5567), (5651), (5793), (5982), (6315), (6877), (6944), etc.
|