[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

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

530.0. "What BATCH queue am I running in?" by SRFSUP::LONGO (Bob Longo) Thu Aug 13 1987 16:16

    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.RTitleUserPersonal
Name
DateLines
530.1Try thisKBOMFG::COLDITZPeter Colditz @KBOFri Aug 14 1987 10:1033
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$GETQUIVAXWRK::NEEDLEJeff NeedleMon Aug 17 1987 01:534
I don't have my doc set handy, but I think $GETQUI will do this
for you.

j.
530.3It is in $GETQUISTAR::BFISHERBill FisherMon Aug 17 1987 14:503
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.4Now all I need is a lexical $GETQUI functionSRFSUP::LONGOBob LongoTue Aug 18 1987 05:0111
    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.5CLT::GILBERTBuilderWed Aug 19 1987 14:073
    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.6VIDEO::LEICHTERJJerry LeichterSat Aug 22 1987 14:373
re: .4
V5
							-- Jerry
530.7How about in Macro?INFACT::NORTHERNLook quick, it won't last!!!Fri Sep 11 1987 00:266
    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