The Question is:
I have a job in an OpenVMS batch queue which is submitted with /RETAIN=error.
When the job completes with an error it will retain in the queue and when I
use the $ SHOW ENTR/FULL command I can see the exit status which caused the
I would like to know if it is possibel to determine this exit status using the
lexical function F$GETQUI. I have succeeded in determining the 'retained on
error' status using the "JOB_STATUS" but I do not know how I can get a hold on
the error status of t
Please let me know if this is possible and how to get the error status (longword)
Thanks in advance
The Answer is :
The F$GETQUI keyword is CONDITION_VECTOR, but it may be simpler to use the
SYNCHRONIZE command. Since the job has completed, SYNCHRONIZE will return
immediately, with the completion status of the job in $STATUS.
$ TYPE EXITSTAT.COM
$ EXIT 'p1'
$ SUBMIT/RETAIN=ERROR EXITSTAT/PARAM="%X10018290"
Job EXITSTAT (queue SPELL$BATCH, entry 507) started on SPELL$BATCH
$ SHOW ENTRY/FULL 507
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
507 EXITSTAT WIZARD Retained on error
%RMS-W-FNF, file not found
On available batch queue SPELL$BATCH
Submitted 13-DEC-2000 10:20:46.07 /PARAM=("%X10018290") /PRIORITY=100 /RETAIN=ERROR
Completed 13-DEC-2000 10:20:46.38 on queue SPELL$BATCH
$ SHOW SYMBOL $STATUS
$ STATUS == "%X10018290"
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), etc.