ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CL program entery missing in JOBLOG & Spool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      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))
      Program2
      Code:
      DCL        VAR(&JRNMQ)   TYPE(*CHAR) LEN(10)          
      
      SNDPGMMSG  MSGID(CPA2401) MSGF(QCPFMSG) MSGDTA(&LIB) + 
                   TOMSGQ(TempLib/&JRNMQ)
      Greg Craill: "Life's hard - Get a helmet !!"

      Comment


      • #4
        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)
        This should ensure that the submitted job produces a job log. You can also change this from within the job by doing CHGJOB LOG(4 0 *SECLVL) or within the job description for the job, etc...

        Comment


        • #5
          Re: CL program entery missing in JOBLOG & Spool

          Originally posted by KrishnaAS400
          ...i am getting Spool entries only for the internal submit jobs submitted by C1, but there is no entry for C1.
          Does that mean you get five spooled joblog files, one for each of the five SBMJOB jobs? But you don't get one for the batch C1 job?
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment

          Working...
          X