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:
MSG='JOB %%JOBNAME HAS AN ERROR CHECK IT'
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.
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.