Originally posted by KrishnaAS400
Announcement
Collapse
No announcement yet.
CL program entery missing in JOBLOG & Spool
Collapse
X
-
Re: CL program entery missing in JOBLOG & Spool
-
Re: CL program entery missing in JOBLOG & Spool
When you submit the job, do this:
Code:SBMJOB CMD(the command here) JOBQ(whatever) LOG(4 0 *SECLVL)
Leave a comment:
-
Re: CL program entery missing in JOBLOG & Spool
Have the first job monitor when the slave jobs are completed. Snippets of CL below, just fuzzy up what parms are passed etc and then it logs it all to the main jobs joblog, and you can also take programatic actions based on one/all of the slave jobs completing as that event is monitored.
Program1
Code:DCL VAR(&JRNMQ) TYPE(*CHAR) LEN(10) DCL VAR(&MSGDATA) TYPE(*CHAR) LEN(100) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&COUNT) TYPE(*DEC) LEN(2) VALUE(0) DCL VAR(&JOBQ) TYPE(*CHAR) LEN(10) DLTMSGQ MSGQ(TempLib/&JRNMQ) MONMSG MSGID(CPF0000) CRTMSGQ MSGQ(UTempLib/&JRNMQ) CHGVAR VAR(&COUNT) VALUE(4) SBMJOB CMD(CALL PGM(Program2) PARM(&PA &ENV)) JOB(JOB_PA) JOBQ(&JOBQ) SBMJOB CMD(CALL PGM(Program2) PARM(&PB &ENV)) JOB(JOB_PB) JOBQ(&JOBQ) SBMJOB CMD(CALL PGM(Program2) PARM(&PC &ENV)) JOB(JOB_PC) JOBQ(&JOBQ) SBMJOB CMD(CALL PGM(Program2) PARM(&PD &ENV)) JOB(JOB_PD) JOBQ(&JOBQ) /* --------- Monitor for Journalling Ended --------------------------- */ MONJEND: RCVMSG MSGQ(TempLib/&JRNMQ) WAIT(*MAX) MSGDTA(&MSGDATA) MSGID(&MSGID) IF COND(&MSGID *NE 'CPA2401') THEN(GOTO CMDLBL(MONJEND)) /* If msg CPA2401 is received then 1 job has finished */ CHGVAR VAR(&COUNT) VALUE(&COUNT - 1) SNDPGMMSG MSG('End of Job for Library ' *BCAT + &MSGDATA *BCAT ' completed') /* Loop back until all 4 libraries are completed. */ IF COND(&COUNT *NE 0) THEN(GOTO CMDLBL(MONJEND))
Code:DCL VAR(&JRNMQ) TYPE(*CHAR) LEN(10) SNDPGMMSG MSGID(CPA2401) MSGF(QCPFMSG) MSGDTA(&LIB) + TOMSGQ(TempLib/&JRNMQ)
Leave a comment:
-
Re: CL program entery missing in JOBLOG & Spool
That doesn’t make much sense. Please copy/paste the first two joblog entry messages from the C1 joblog. Those messages will give us some info about what you are asking.
Leave a comment:
-
CL program entery missing in JOBLOG & Spool
Hi all,
I have a CLP program C1 which is using SBMJOB inside the program to run 5 different batch jobs, and when i submit C1, i am getting Spool entries only for the internal submit jobs submitted by C1, but there is no entry for C1. But I want to get the starting time and ending time of my batch Job C1. How to get it in this case?..
Thanks!
Leave a comment: