Hey!
Let's see how we can make use of NOTIFY parameter and NOTIFY statement in JCL to send job completion message to multiple TSO user ID's.
I believe 🤞 most of you reading this post would be aware of NOTIFY parameter used in the JOB statement.
//Z01071A JOB 1,NOTIFY=&SYSUID
It sends TSO message to the user to notify the success or failure of the job. The user's ID is automatically detected by the JCL, thanks to &SYSUID. SYSUID is a system symbol in JCL. During the run time of the JCL, &SYSUID will be substituted with the user ID under whose authority the job had been submitted.
We can also hardcode the user ID instead of providing &SYSUID.
What if we wanted to send the TSO messages to multiple user ID's?
The NOTIFY statement is supported by JES2 only, beginning in z/OS V2R3.
A maximum of 8 NOTIFY statements can be specified in a JCL.
You can also use the NOTIFY statement to send an email 📧, to the specified email ID, about the job's completion status.
JCL with NOTIFY statement and EMAIL parameter. |
When you are using EMAIL parameter, you can't use the USER parameter as EMAIL and USER parameters are mutually exclusive.
Which of the 2 TYPE parameters work well?
We've hit the bottom of this post...
NOTIFY statements will be of great help when another team has to submit their job(s) based on the completion of job(s) that you or your team submit. You may simply include the participant(s) User ID/email so that they get notified about your job's completion status.
Over to you now. Try the NOTIFY statement at your site. ⚠ If you want to use the EMAIL parameter, ensure that you're providing your Work email ID.
Hope this helps. Thanks for reading. Hit a Like if this post was useful. Share your questions/suggestions in the Comments section below.
Thanks Srini, Came to know that we can publish the job status to other users as well. I tried that it worked perfectly. But, NOTIFY EMAIL option haven't worked for me as well :( I did some googling, no luck. Keep this feed updated if you find any way.
ReplyDelete