Is there a (simple) way of getting the entry number of a batch job from within the job?
Thanks,
Mark
Get the entry number of a batch job
Re: Get the entry number of a batch job
Code: Select all
> Is there a (simple) way [...]
Define "simple".
HELP LEXICALS F$GETQUI ! (Abandon hope, ...)
its $ submit /noprint qe.com /log = []qe.log
Job qe (queue SYS$BATCH_ITS, entry 963) started on SYS$BATCH_ITS
its $
Job qe (queue SYS$BATCH_ITS, entry 963) completed
its $ type qe.log
$ Set NoOn
$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))
entry: 963
SMS job terminated at 22-OCT-2020 13:39:50.38
Accounting information:
Buffered I/O count: 102 Peak working set size: 4672
Direct I/O count: 47 Peak virtual size: 178112
Page faults: 367 Mounted volumes: 0
Charged CPU time: 0 00:00:00.03 Elapsed time: 0 00:00:00.10
its $ type qe.com
$! function item object-id flags
$ e = f$getqui( "DISPLAY_ENTRY", "ENTRY_NUMBER", , "THIS_JOB")
$!
$ write sys$output " entry: ''e'"
-
- Master
- Posts: 136
- Joined: Sat Aug 15, 2020 9:00 am
- Reputation: 0
- Location: Cambridge, UK
- Status: Offline
Re: Get the entry number of a batch job
Yes, f$getqui can be a bit daunting at first!
However there is a much simpler way - look for the local symbol $ENTRY
Chris
However there is a much simpler way - look for the local symbol $ENTRY
Code: Select all
$ create test.com
write sys$output "Test"
^Z
$ show symb $entry
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
$ subm/keep test
Job TEST (queue SYS$BATCH, entry 1) started on SYS$BATCH
$ show symb $entry
$ENTRY = "1"
$
--
Chris
Chris
Re: Get the entry number of a batch job
Code: Select all
> $ show symb $entry
> $ENTRY = "1"
Now try that "from within the job".
-
Topic author - Contributor
- Posts: 13
- Joined: Thu Oct 22, 2020 11:24 am
- Reputation: 0
- Status: Offline
Re: Get the entry number of a batch job
Hi sms,
A much delayed response, but thanks for your answer and I think it qualifies as "simple"!
Regards,
Mark
A much delayed response, but thanks for your answer and I think it qualifies as "simple"!
Regards,
Mark