Purpose
The NOTIFY parameter allows you to specify one or more TSO users who will receive notification messages when a job completes. These notifications inform the recipient about the job's completion status, including whether it ended normally or abnormally, as well as basic job statistics.
Syntax
Basic Syntax - Single User
//jobname JOB parameters,NOTIFY=userid
Multiple Users (JES2 Only)
//jobname JOB parameters,NOTIFY=(userid1,userid2,...)
On OUTPUT Statement (For Output Notifications)
//stepname OUTPUT NOTIFY=userid
Format
The NOTIFY parameter has the following format characteristics:
- userid - A valid TSO user ID (1-7 alphanumeric characters, starting with an alphabetic or national character)
- Multiple users - Enclosed in parentheses and separated by commas (JES2 only)
- AUTO option -
NOTIFY=*
to send notifications to the submitting user - Node specification -
NOTIFY=nodename.userid
to send to a user on a specific node in a network
System Differences
Feature | JES2 | JES3 |
---|
Multiple recipients | Supported | Not supported |
Auto notification | NOTIFY=* supported | NOTIFY=* supported |
Network nodes | Supported | Limited support |
Output notifications | Via OUTPUT statement | Via OUTPUT statement |
Examples
Basic Notification
//PAYROLL JOB (ACCT123),'MONTHLY PAYROLL',CLASS=A,NOTIFY=USER01
USER01 will receive notification when the PAYROLL job completes.
Auto-Notification
//BACKUP JOB (ACCT456),'BACKUP',CLASS=A,NOTIFY=*
The user who submitted the job will receive notification when it completes.
Multiple Recipients (JES2 Only)
//FISCAL JOB (ACCT789),'FISCAL REPORT',CLASS=A,NOTIFY=(ACCTMGR,ADMIN01,AUDITOR)
Three users will receive notifications when the FISCAL job completes.
Network Node Specification
//MERGE JOB (ACCT321),'DATA MERGE',CLASS=A,NOTIFY=NYCNODE.DBADMIN
User DBADMIN on node NYCNODE will receive notification.
Output-Specific Notification
//MONTHEND JOB (ACCT555),'MONTH END',CLASS=A
//OUTCTL OUTPUT NOTIFY=FINANCE
//STEP1 EXEC PGM=MONTHEND
//REPORT DD SYSOUT=A,OUTPUT=*.OUTCTL
User FINANCE will receive notification when the output from STEP1 is available.
Notification Message Format
When a job completes, TSO users specified in the NOTIFY parameter will receive messages similar to these examples:
$HASP165 PAYROLL ENDED AT NYC MAXCC=0
$HASP165 FISCAL ENDED AT NYC -- ABEND S0C7
$HASP165 BACKUP ENDED AT NYC -- JCL ERROR
The message includes the job name, completion location, and status information:
- Normal completion: Shows the highest condition code (MAXCC)
- Abnormal termination: Shows the abend code (e.g., S0C7)
- JCL error: Indicates the job failed due to JCL errors
Use Cases
Production Job Monitoring
- Notify operations staff of critical job completion
- Alert application support teams of job failures
- Inform business users when their reports are ready
Development and Testing
- Notify developers when test jobs complete
- Alert testers of successful or failed test runs
- Coordinate team activities with job completion notices
Batch Processing Workflows
- Signal completion of prerequisite jobs to operators
- Alert teams when manual intervention is needed
- Inform stakeholders of successful processing
Report Distribution
- Notify users when their reports are ready to view
- Alert report administrators of generation failures
- Coordinate report distribution processes
Processing Details
- Timing: Notifications are sent as soon as the job completes (or output is available for OUTPUT statement notifications)
- User Status: The specified user must be defined to the system, but does not need to be logged on when the job completes
- Message Delivery:
- If the user is logged on, the message appears immediately on their terminal
- If the user is not logged on, the message will be displayed when they next log on
- Security: Users only receive notifications for jobs they are authorized to access
- Storage: Notification messages are stored in the broadcast dataset if the user is not logged on
Additional Features
Compatibility with Automation Software
Many automation tools and job schedulers can intercept and process NOTIFY messages to:
- Trigger subsequent jobs based on completion status
- Send email or text notifications to support personnel
- Log job statistics and create reports
- Generate alerts for failed jobs
Integration with Job Log
Even when using NOTIFY, complete job details are still available in:
- The job log (viewable through SDSF or equivalent tools)
- System management facilities (SMF) records
- Job output in JES queues
Limitations
- Limited Information: Notifications only provide basic completion information; detailed diagnostics require viewing the job log
- User Constraints: Specified users must be valid TSO users known to the system
- JES2 vs JES3: Multiple recipients are only supported in JES2 environments
- Message Size: Notifications contain limited information (typically one line)
- Network Limitations: Cross-node notifications may be subject to network configuration and availability
- Broadcast Dataset: Notifications for offline users consume space in the broadcast dataset
Common Mistakes
Best Practices
- Use NOTIFY=* for development: When developing and testing jobs, use NOTIFY=* to automatically receive notifications
- Establish notification standards: Create consistent job notification strategies across your organization
- Create notification user groups: Set up dedicated TSO user IDs for notification purposes that are accessible by support teams
- Combine with automation: Integrate NOTIFY with job scheduling and automation tools for enhanced processing
- Regular broadcast dataset cleanup: Ensure notification messages don't accumulate indefinitely in the broadcast dataset
- Document notification recipients: Maintain documentation on which users should be notified for which jobs
- Review security implications: Ensure notification recipients have appropriate access rights
Related Concepts
- JOB Statement - The NOTIFY parameter is coded on the JOB statement
- OUTPUT Statement - Can also use the NOTIFY parameter for output-specific notifications
- MSGCLASS Parameter - Controls job output class, which can affect how job results are handled
Related Pages