NOTIFY Parameter

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

jcl
1
//jobname JOB parameters,NOTIFY=userid

Multiple Users (JES2 Only)

jcl
1
//jobname JOB parameters,NOTIFY=(userid1,userid2,...)

On OUTPUT Statement (For Output Notifications)

jcl
1
//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

FeatureJES2JES3
Multiple recipientsSupportedNot supported
Auto notificationNOTIFY=* supportedNOTIFY=* supported
Network nodesSupportedLimited support
Output notificationsVia OUTPUT statementVia OUTPUT statement

Examples

Basic Notification

jcl
1
//PAYROLL JOB (ACCT123),'MONTHLY PAYROLL',CLASS=A,NOTIFY=USER01

USER01 will receive notification when the PAYROLL job completes.

Auto-Notification

jcl
1
//BACKUP JOB (ACCT456),'BACKUP',CLASS=A,NOTIFY=*

The user who submitted the job will receive notification when it completes.

Multiple Recipients (JES2 Only)

jcl
1
//FISCAL JOB (ACCT789),'FISCAL REPORT',CLASS=A,NOTIFY=(ACCTMGR,ADMIN01,AUDITOR)

Three users will receive notifications when the FISCAL job completes.

Network Node Specification

jcl
1
//MERGE JOB (ACCT321),'DATA MERGE',CLASS=A,NOTIFY=NYCNODE.DBADMIN

User DBADMIN on node NYCNODE will receive notification.

Output-Specific Notification

jcl
1
2
3
4
//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:

jcl
1
2
3
$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

  • Invalid User IDs: Specifying user IDs that don't exist in the system
    jcl
    1
    //JOB1 JOB NOTIFY=BADUSER // Error if BADUSER doesn't exist
  • Using multiple users in JES3: Attempting to specify multiple recipients in a JES3 environment
    jcl
    1
    //JOB2 JOB NOTIFY=(USER1,USER2) // Will cause an error in JES3
  • Forgetting security implications: Notifying users who don't have access rights to the job

    Note: Users with insufficient access rights may not receive notifications or may receive limited information

  • Incorrect syntax on OUTPUT statement: Confusing JOB and OUTPUT statement parameters
    jcl
    1
    //OUT1 OUTPUT CLASS=A,NOTIFY // Missing user ID
  • Over-reliance on notifications: Using NOTIFY as the only means of job monitoring without additional controls

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