NOTIFY parameter
A JOB statement parameter that sends a TSO message to a user when the job ends, saying how it finished.
Also written NOTIFY=, NOTIFY=&SYSUID, job end message, $HASP165
NOTIFY on the JOB statement names a user to tell when the job ends. NOTIFY=&SYSUID sends the message to whoever submitted the job, which is why it appears in so many examples.
When the job finishes, the user sees a message in their TSO session, for example a $HASP165 message with the job name, its number and the highest return code, such as MAXCC=0000. If the job ended with an abend or a JCL error, the message says so instead.
That saves a lot of checking. You submit a job, carry on with other work, and the message tells you when to go and look at the output in SDSF. If you are not logged on when the job ends, the message is usually saved and shown the next time you log on.
If you never get the message, check that NOTIFY is on the JOB statement, not on another line, and that the user ID is right. Production jobs usually do not use NOTIFY, because the scheduler watches them instead.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- JOB statementThe first statement in every job, giving it a name and telling the system who is running it and how to treat it.
- Symbolic parameterA name starting with an ampersand in JCL that is replaced with a value before the job runs, so the same JCL can be reused with different values.
- SubmitHanding JCL to the system to be run, which queues it as a job and gives it a job number.
- JES2The job entry subsystem: the part of z/OS that queues jobs, decides when they run, and collects their output.
- Return codeA number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.