JCL Operator Messages

Purpose

JCL Operator Messages are mechanisms for jobs to communicate with system operators, request actions, provide status information, or interact with automated operations tools. These messages enable critical human-machine interaction in mainframe batch processing environments.

Key Benefit:

Operator messages facilitate human intervention, decision-making, and oversight for batch jobs, enabling operators to respond to resource requests, approve actions, and monitor critical job status in real-time.

Types of Operator Messages

There are several mechanisms for generating operator messages in JCL:

  • NOTIFY Parameter: Sends job completion notifications to a specified user
  • WTO (Write to Operator) Macros: In application programs to send messages to the operator console
  • /*MESSAGE Statement: JES2 control statement to send a message to the operator
  • //*OPERATOR Statement: JES3 control statement to send a message to the operator
  • WTOR (Write to Operator with Reply): Messages that require operator response
  • JCL Job Status Messages: System-generated messages about job status

Message Destinations

Operator messages can be directed to various destinations:

DestinationDescriptionHow to Specify
System ConsolePrimary operator console or console poolDefault for WTO and WTOR messages
Specific ConsoleA particular operator console by IDROUTCDE parameter in WTO
Console GroupFunctional group of consoles (e.g., tape management)ROUTCDE parameter in WTO
TSO UserSpecific user's terminal sessionNOTIFY parameter on JOB statement
System Log (SYSLOG)System message logMost console messages are recorded here
Automation ToolOperations automation software (e.g., IBM NetView, CA OPS/MVS)Special message formats or descriptors

Message Statement Syntax

NOTIFY Parameter (JOB Statement)

jcl
1
2
//MYJOB JOB (ACCT),'MY JOB', // NOTIFY=userid

The NOTIFY parameter sends a message to the specified user when the job completes.

JES2 /*MESSAGE Statement

jcl
1
/*MESSAGE 'This is a message for the operator'

The /*MESSAGE statement sends a message to the operator console when the job is submitted.

JES3 //*OPERATOR Statement

jcl
1
//*OPERATOR 'This is a message for the operator'

The //*OPERATOR statement sends a message to the operator console when the job is interpreted by JES3.

WTOR Example (in an Application)

assembler
1
WTOR 'ENTER Y TO CONTINUE, N TO ABORT',REPLY,1,ECB

This example from an assembler program requests a reply from the operator.

Message Attributes and Classification

Messages can be classified by various attributes to control their appearance and handling:

AttributeOptionsPurpose
Descriptor Codes1-16Define the message type and importance (e.g., system failure, immediate action required)
Routing Codes1-128Determine which consoles receive the message
Message LevelInformational, Warning, Error, CriticalIndicates the severity of the situation
HighlightingNormal, Intensified, BlinkingControls the visual prominence of the message
ColorWhite, Red, Green, Blue, etc.Visually categorizes messages

Common Operator Message Categories

  • Resource Requests: Requesting mounting of tapes, loading of paper, etc.
  • Decision Points: Requesting operator decision on job continuation
  • Status Updates: Informing operators of important job milestones
  • Error Notifications: Alerting operators to problems requiring intervention
  • Security Notifications: Alerting about security-related events
  • Completion Notices: Informing about job or step completion status

Common JCL-Related System Messages

Message IDDescriptionTypical Response
IEF233ADataset not found, job is waitingProvide dataset or cancel job
IEC501AMount tape requestMount tape or redirect to different drive
IEF213IJob step completedNo action required (informational)
IEF450IJob abendedInvestigate cause of failure
IEA995ISymptom dump for abendExamine for problem diagnosis
IEF404IJob endedNo action required (informational)

Using JCL Commands to Control Job Processing

Operators can issue commands to control job execution. These aren't JCL-generated messages but are the primary way operators respond to jobs:

CommandFunctionExample
$CCancel a job$C J123
$PStop a job after current step completes$P J123
$ARelease a held job$A J123
$HHold a job$H J123
$DDisplay job information$D J123
$RRespond to a WTOR message$R 123,YES

Usage Examples

Job Completion Notification

jcl
1
2
3
//BACKUP JOB (ACCT),'DATABASE BACKUP', // NOTIFY=DBADMIN, // CLASS=A,MSGLEVEL=(1,1)

This example sends a job completion notification to the DBADMIN user.

Operator Instructions for Tape Job

jcl
1
2
3
4
5
6
7
8
//TAPEJOB JOB (ACCT),'MONTHLY ARCHIVE',CLASS=A /*MESSAGE 'TAPEJOB REQUIRES SCRATCH TAPE - PLEASE MOUNT WHEN REQUESTED' //STEP1 EXEC PGM=BACKUP //TAPE DD DSN=MONTHLY.ARCHIVE, // UNIT=TAPE, // VOL=SER=SCRTCH, // DISP=(NEW,KEEP) //INPUT DD DSN=MONTHLY.DATA,DISP=SHR

This example sends instructions to the operator about tape requirements when the job is submitted.

JES3 Operator Message with Job Hold

jcl
1
2
3
4
5
6
//BIGPROC JOB (ACCT),'MONTHLY PROCESSING', // CLASS=A,TYPRUN=HOLD //*OPERATOR 'BIGPROC REQUIRES 4 HOURS CPU TIME - RELEASE WHEN RESOURCES AVAILABLE' //STEP1 EXEC PGM=MONTHEND //SYSOUT DD SYSOUT=* //INPUT DD DSN=MONTHLY.DATA,DISP=SHR

This example holds the job upon submission and informs the operator to release it when resources are available.

Program with WTOR in JCL

jcl
1
2
3
4
5
//UPDATE JOB (ACCT),'DATABASE UPDATE',CLASS=A /*MESSAGE 'UPDATE JOB WILL REQUIRE OPERATOR CONFIRMATION BEFORE CHANGES' //STEP1 EXEC PGM=DBUPDATE,PARM='CONFIRM=YES' //SYSOUT DD SYSOUT=* //DBDATA DD DSN=PROD.DATABASE,DISP=OLD

This example prepares the operator for an interactive program that will require confirmation before proceeding.

Automation Considerations

Modern mainframe environments often use automation tools to handle operator messages programmatically:

  • Message Formatting for Automation: Using consistent prefixes or patterns that automation tools can recognize
  • Automation-Specific Parameters: Including special tokens or identifiers for automated processing
  • Suppressing Display: Some messages may be sent only to automation, not human operators
  • Automatic Responses: Allowing automation tools to reply to WTOR messages based on predefined rules
jcl
1
/*MESSAGE 'AUTO:TAPEJOB:MOUNT:ARCHIVE001'

This example includes special formatting that an automation tool might parse to automatically handle a tape mount request.

Common Issues and Troubleshooting

IssuePossible CausesSolutions
Message not appearingRoute code issue or suppressed by system settings
  • Check system message settings
  • Verify console has appropriate routing codes
  • Check for message suppression rules
NOTIFY message not receivedUser not logged on or messaging disabled
  • Ensure user is logged on
  • Check TSO settings
  • Consider alternative notification methods
Job waiting indefinitelyOperator missed WTOR message
  • Use DISPLAY R,L command to show outstanding replies
  • Consider automation for common requests
  • Set timeouts for WTOR messages
Message timing issuesJES2 vs JES3 timing differences
  • Understand when each type of message is processed
  • Use appropriate message type for timing needs

Best Practices

  1. Be Clear and Concise: Write messages that clearly communicate what action is needed
  2. Include Job Identification: Always include job name or other identifier in messages
  3. Standardize Message Formats: Use consistent formats for similar types of messages
  4. Minimize Operator Intervention: Design jobs to run without operator action when possible
  5. Document Expected Messages: Include a list of expected operator messages in job documentation
  6. Use Appropriate Message Types: Don't use WTOR if no reply is actually needed
  7. Consider Automation: Design messages to work with automation tools
  8. Include Contact Information: For critical messages, include who to contact for problems
  9. Time Messages Appropriately: Send messages when action is needed, not too far in advance

JES2 vs JES3 Considerations

There are important differences in operator message handling between JES2 and JES3:

FeatureJES2JES3
Message statement/*MESSAGE//*OPERATOR
Message timingAt job submissionDuring JES3 interpretation phase
Console integrationStandard MVS console interfaceEnhanced JES3 console capabilities
Operator commands$-prefix commands*-prefix commands

Note:

With z/OS 2.5, JES3 is being phased out in favor of JES2, making JES2-specific behaviors the standard moving forward.

Related Concepts