Another reason why I hate CPF0000 messages...
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF0000) EXEC(GOTO ACTIVE)
/* if the data area can be allocated then the monitor job is not active */
DLCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL))
SBMJOB CMD(CALL PGM(DTAQPGM)) JOB(DTAQMON)
ACTIVE:
What happens if the data area doesn't exist? After all, your monitor job
builds it so plainly it is not expected to be there on startup.
Actually, the exception messages for ALCOBJ suck. You have to monitor for
CPF1085, then you have to find the diagnostic messages as to why CPF1085
failed. These could include:
CPF0939 - Object BUFU type *DTAARA was not found in library ROB.
CPF0952 - Library BUFU not found for *DTAARA BUFU.
CPF0986 - No authority to library DUMMYX.
CPF0991 - No authority to object BUFU in library DUMMYX type *DTAARA.
So it may be
ALCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF1085) EXEC(GOTO wtf)
/* if the data area can be allocated then the monitor job is not active */
DLCOBJ OBJ((QGPL/DTAQJOB *DTAARA *EXCL))
FireUp:
SBMJOB CMD(CALL PGM(DTAQPGM)) JOB(DTAQMON)
goto mainBody
wtf:
RCVMSG ... MSGID(&MSGID) ...
If &msgid='CPF0939' THEN(GOTO FireUp) /* *DTAARA does not exist */
/* Unknown error - alert the troups */
DMPCLPGM
DSPJOBLOG OUTPUT(*PRINT)
DSPJOB OUTPUT(*PRINT)
GOTO fo
mainBody:
...
fo:
ENDPGM
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.