3 Replies Latest reply: May 21, 2012 12:19 PM by Darryl Heathscott RSS

Job Failure Alert for job running outside of Ctl-M

Darryl Heathscott

I have a job that is submitted from Ctl-M and the job generates JCL internally then submits a child job using the INTRDR statement to send the JCL directly to the JES queue. Since Ctl-M doesn't submit the child job we lose monitoring ability and it becomes a manual process to check the status of the job to see if it has failed. The template JCL for the child job will be updated to use the IOACND command to post a condition to show the job completed successfully. Is there a different parm that can be used with IOACND to create a failure alert on the Alert console on the EM GUI screen?

 

//CTLMGOOD   EXEC IOACND,PARM='ADD MFIS-DBRFINIT-OK STAT'

  • 1. Job Failure Alert for job running outside of Ctl-M
    Anirban Dutta

    Moved your discussion to the Control-M forum

  • 2. Job Failure Alert for job running outside of Ctl-M
    Joe Goldberg

    Instead of submitting the JCL directly to the internal reader, I would recommend one level of indirection that would instead dynamically create a job that would be fully managed by Control-M. Here is what you can consider:

     

    The original job that generates the JCL would have to be modified to generate JCL that executes the CTMBLT utility. The intput to that utility would look something like the following:

     

    LIBRARY=NOT.USED

    MEM-OVERWRITE=FORCE

    TABLE=TABLE1

       TABLE=TABLE1

       MEMLIB=NOTUSED

       MEMNAME=ANYNAME

       OWNER=RDCJXG

       CONFIRM=Y

       IN=(JG-STARTJOB-OK,ODAT)

       OUT=(JG-ENDJOB-OK,ODAT,+)

       SHOUT-WHEN=NOTOK

             DEST=U-ECS

             MSG='JOB %%JOBNAME HAS AN ERROR CHECK IT'

             URG=U

       DESC='SOME DESCRIPTION TEXT'

       JCL="//RDCJXGBB JOB ,'JOE GOLDBERG',CLASS=A,MSGCLASS=H,      "

       JCL="//         NOTIFY=RDCJXG                                "

       JCL="//RUNGENER EXEC PGM=IEBGENER                            "

       JCL="//SYSPRINT DD   SYSOUT=*                                "

       JCL="//SYSIN    DD   DUMMY                                   "

       JCL="//SYSUT1   DD   DISP=SHR,DSN=RDCJXG.BMC.RPT(TRUCKS02)   "

       JCL="//SYSUT2   DD   SYSOUT=C                                "

     

    The above input dynamically builds and FORCEs a job into the Control-M Active Environment. This new job uses inline JCL which would be the JCL that you are currently generating. However, the CTMBLT utility enables you to add any Control-M processing you wish including IN/OUT conditions AND the ability to SHOUT,

     

    You can get more infromation about the CTMBLT utility in the Control-M for z/OS Utilities Guide.

  • 3. Job Failure Alert for job running outside of Ctl-M
    Darryl Heathscott

    That would be the preferable route to take, if my team owned the JCL which we do not. An off-shore 3rd party company owns the JCL and reports to my customer, not to the company I work for, so we can not force them to change a decade old job without them charging our customer for programming work.

     

    We are playing with some CMEM rules to look for this child job then it would create a shadow jobs in the AFJ making it look like a job is truly running from within Ctl-M. If the real job fails or complete successfully the CMEM will be able to see the real job and post the information to the shadow jobs. This will allow us to setup alerts and post conditions to allow the rest of the flow, that is setup within Ctl-M, to continue to run.

     

    Thanks anyway, I was hoping someone had a  JCL statement to allow the alert creation to be added to the template JCL so if the real jobs failed then we would see the alerts on our EM console. Since we have come up with the CMEM route as a possibility I believe we have a way to accomplish what we need without causing the off-shore 3rd party from getting involved which would cause a formal project.