| Title: | -={ H A C K E R S }=- |
| Notice: | Write locked - see NOTED::HACKERS |
| Moderator: | DIEHRD::MORRIS |
| Created: | Thu Feb 20 1986 |
| Last Modified: | Mon Aug 03 1992 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 680 |
| Total number of notes: | 5456 |
Does anyone know how to determine (from within a batch job) what
the name of the currently executing batch queue is? I would like
to be able to requeue the job into the same queue, but I can't think
of a way to do it.
Thanks,
-Bob
[This note posted in HACKERS and COMMAND_PROCEDURES]
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 530.1 | Try this | KBOMFG::COLDITZ | Peter Colditz @KBO | Fri Aug 14 1987 06:10 | 33 |
Hi Bob,
Actually I know of no DCL command, like f$get...("BATNAM").
Here on our cluster our generic batch queue distributes the entries to
queues on different CPUs, e.g. the KBOV02_BATCH, KBOV05_BATCH, KBOV07_BATCH.
I can help with the following command.
$ WRITE SYS$OUTPUT "Entry ",f$extract(11,4,f$getjpi("","PRCNAM"))," on ",-
f$getsyi("NODENAME"),"_BATCH"
e.g. $ Entry 1123 on KBOV07_BATCH
Or you can go the other way. Write the complete $ sho que information to
a file and search through looking for username and entry name. This will need
a longer time but give you each batch name.
$ sho queu/out=sys$login:queue.tmp
$ user = f$edit (f$getjpi("","USERNAME"),"COLLAPSE")
entry = f$extract (11,4,f$getjpi("","PRCNAM"))
$ sea/wind=10/out=sys$login:actual_batch.tmp/match=and sys$login:queue.tmp -
"''user'","''entry'"
$ open tmp sys$login:actual_batch.tmp
$ read tmp batch_queue
$ close tmp
$ write sys$output batch_queue
$ delete sys$login:queue.tmp;,sys$login:actual_batch.tmp;
e.g. $ Batch queue KBOV02_BATCH, on KBOV02::
Hope this will do it for you
Peter
| |||||
| 530.2 | $GETQUI | VAXWRK::NEEDLE | Jeff Needle | Sun Aug 16 1987 21:53 | 4 |
I don't have my doc set handy, but I think $GETQUI will do this for you. j. | |||||
| 530.3 | It is in $GETQUI | STAR::BFISHER | Bill Fisher | Mon Aug 17 1987 10:50 | 3 |
Yes, specifying the QUI$V_SEARCH_THIS_JOB option in the QUI$_SEARCH_FLAGS item code along with the QUI$_QUEUE_NAME item code will accomplish what you want when you use it with the QUI$_DISPLAY_JOB function code of $GETQUI. | |||||
| 530.4 | Now all I need is a lexical $GETQUI function | SRFSUP::LONGO | Bob Longo | Tue Aug 18 1987 01:01 | 11 |
RE: .2,.3
Thanks for pointing me in the direction of $GETQUI. I guess I'll
have to write a quick-and-dirty program that'll use $GETQUI and
create a logical name or a symbol I can read from DCL.
Sounds like a lexicla function to provide this information may be
a good thing to put in PHASE0.
Thanks again,
-Bob
| |||||
| 530.5 | CLT::GILBERT | Builder | Wed Aug 19 1987 10:07 | 3 | |
There's something in the STC called BATCHINFO that will give you
this information. It does it the dirty way, but at least it's
already coded.
| |||||
| 530.6 | VIDEO::LEICHTERJ | Jerry Leichter | Sat Aug 22 1987 10:37 | 3 | |
re: .4 V5 -- Jerry | |||||
| 530.7 | How about in Macro? | INFACT::NORTHERN | Look quick, it won't last!!! | Thu Sep 10 1987 20:26 | 6 |
If this is a problem, one of our local talents has written this
in macro, I think I could talk him into sharing it.
(Puts the queue name out into a DCL symbol)
Lou "Send Mail" Northern
| |||||