MainframeMaster

COBOL Tutorial

REPLY - Operator Replies (WTOR)

Progress0 of 0 lessons

Overview

REPLY is an operator response to a system or application message that requests a reply (WTOR). Jobs pause, awaiting operator input, and continue once a reply is entered.

☎️ Analogy

A paused phone menu: the system asks a question and waits. Only when you press a key (reply) does it proceed.

Console and SDSF

Operators use the system console or SDSF panels to view outstanding replies and respond.

Operator Reply (Example)

plaintext
1
R 42,YES

Responds to outstanding WTOR number 42 with text YES. The exact number and text depend on the message.

WTOR Emitter (Conceptual)

System utilities, subsystems, or site exits may issue a WTOR. COBOL can participate through site APIs, but there is no standard COBOL WTOR verb.

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

Example shows an assembler macro style. Replies are then entered via console.

Best Practices and Pitfalls

Best Practices

  • Minimize reliance on operator replies in production
  • Provide defaults and timeouts to avoid indefinite waits
  • Document reply values and meanings in runbooks
  • Automate replies for standard scenarios

Common Mistakes

MistakeProblemFix
No timeoutJob waits foreverSet timeouts or automation
Ambiguous promptsWrong replies from operatorsClear messages with valid choices
Overuse of WTOROperational burdenUse configuration, not prompts

Quick Reference

ConceptDefinitionExample
WTORWrite to operator with replyPrompt that pauses a job
REPLYOperator command to answer WTORR 42,YES
SDSF HOutstanding replies panelMonitor and respond

Test Your Knowledge

1. What does REPLY refer to on z/OS?

  • A COBOL statement
  • An operator response to a WTOR console message
  • A DB2 command
  • An ISPF panel

2. What happens if a job issues a WTOR?

  • It ends immediately
  • It waits for an operator reply
  • It compiles COBOL
  • It deletes a dataset

3. Should production batch jobs depend on REPLY often?

  • Yes, it is recommended
  • No, minimize operator intervention
  • Only at IPL time
  • Only in CICS

4. Where do you see pending replies?

  • SDSF H panel, console logs
  • VSAM catalog
  • DB2 catalog
  • OMVS home directory

5. Is REPLY a COBOL keyword?

  • Yes
  • No

Frequently Asked Questions