The WTOR macro causes a message requiring a reply to be written to one or more operator consoles and the hardcopy log. The macro also provides the information required by the system to return the reply to the issuing program. See z/OS MVS Programming: Assembler Services Guide for more information on using the WTOR macro.
For information about how to select the macro for an MVS/SP version other than the current version, see Compatibility of MVS macros.
Requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 24- or 31- or 64-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Must be in the primary address space |
Due to these invalid parameter list errors, you may notice that some messages that once were processed are no longer able to be processed; your program may also receive different return codes. However, in these cases, the symptom record will always be issued, and the diagnostic D23 abend will be issued if possible. IBM recommends that you correct all WTOR errors, regardless of whether or not the message is actually displayed. For an example LOGREC symptom record, see Example 4 in the WTO description.
SLIP SET,ENABLE,COMP=D23,ACTION=SVCD,END
Before issuing the WTOR macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The standard form of the WTOR macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede WTOR. |
WTOR | |
␢ | One or more blanks must follow WTOR. |
‘msg’,reply addr,reply |
msg: Up to 122 characters. |
,ROUTCDE=(routing code) | routing code: Decimal digit from 1 to 28. The routing code is one or more codes, separated by commas, or a hyphen to indicate a range. |
,MCSFLAG=(flag name) | flag name: Any combination
of the following, separated by commas:
|
,DESC=(descriptor code) | descriptor code: Decimal number 7 or 13. If you code both 7 and 13, separate them with commas. |
,MSGTYP=(msg type) | msg type: Any of the following:
Note: IBM recommends that you do not use
MSGTYP=Y. See the MSGTYP explanation on page ,MSGTYP=(msg type) for more information.
|
,RPLYISUR=reply console | reply console: RX-type address or register (2) - (12). |
,CART=cmd/resp token | cmd/resp token: RX-type address or register (2) - (12). |
,CONSID=console id | console id: RX-type address or register (2) - (12). |
,CONSNAME=console name | console name: RX-type address or register (2) - (12). |
,KEY=key | key: RX-type address or register (2) - (12). |
,TOKEN=token | token: RX-type address or register (2) - (12). |
The parameters are explained as follows:
The message is assembled as a variable-length record. text addr contains an address that points to a message to be displayed. The message contains a 2-byte text field length followed by the text. The 2-byte message length describes the length of the message text only. There are no boundary requirements.
reply addr specifies the address in virtual storage of the area into which the system is to place the reply. The reply is left-justified at this address.
reply length specifies the length, in bytes, of the reply message.
ecb addr specifies the address of the event control block (ECB) to be used by the system to indicate the completion of the reply. The value of the ECB data must point to a fullword boundary. The ECB should be zeroed before the WTOR issued. After the system receives the reply, the ECB appears as follows:
Offset | Length(bytes) | Contents |
---|---|---|
0 | 1 | Completion code |
The routing codes are:
The message indicates a change in the system status. It demands action by the operator at the console with master authority.
The message indicates a change in system status. It does not demand action; rather, it alerts the operator at the console with master authority to a condition that might require action.
This routing code is used for any message that indicates job status when the status is not requested specifically by an operator inquiry. It is also used to route processor and problem program messages to the system operator.
The message gives information about tape devices, such as the status of a tape unit or reel, the disposition of a tape reel, or a request to mount a tape.
The message gives information about direct access storage devices (DASD), such as the status of a direct access unit or volume, the disposition of a volume, or a request to mount a volume.
The message gives tape library information, such as a request by volume serial numbers for tapes for system or problem program use.
The message gives disk library information, such as a request by volume serial numbers for volumes for system or problem program use.
The message gives information about unit record equipment, such as a request to mount a printer train.
The message gives the status or disposition of teleprocessing equipment, such as a message that describes line errors.
The message gives information about security checking, such as a request for a password.
The message gives problem information for the system programmer, such as a system error, an uncorrectable I/O error, or information about system maintenance.
This is commonly referred to as write to programmer (WTP). The message is intended for the problem programmer. This routing code is used when the program issuing the message cannot route the message to the programmer through a system output (SYSOUT) data set. The message appears in the JESYSMSG data set.
The message gives information about emulation. (These message identifiers are not included in this publication.)
If you omit the ROUTCDE, and CONSID or CONSNAME parameters, the system uses the routing code specified on the ROUTCODE parameter on the DEFAULT statement in the CONSOLxx member of SYS1.PARMLIB.
Flag Name | Meaning |
---|---|
RESP | The WTOR is an immediate command response. |
REPLY | This is a reply to a WTOR. |
BRDCST | Broadcast the message to all active consoles. |
HRDCPY | Queue the message for hard copy only. |
NOTIME | Do not append time to the message. |
All WTOR messages are action messages that have an @ sign displayed before the first character. This indicates a need for operator action.
The message processing facility (MPF) can suppress messages. For MPF to suppress messages, the hardcopy log must be active. The suppressed messages do not appear on any console; they do appear on the hardcopy log.
For SESS, JOBNAMES, or STATUS, the message is to be routed to the console that issued the MONITOR SESS, MONITOR JOBNAMES, or MONITOR STATUS command, respectively. When the message type is identified by the operating system, the message is routed to only those consoles that requested the information.
IBM recommends that you do not use MSGTYP=Y.
WTOR might abnormally terminate with abend code X'D23'. See z/OS MVS System Codes for an explanation and programmer response for this code.
When the WTOR macro returns control to your program, GPR 15 contains one of the following return codes.
Hexadecimal Return Code | Meaning and Action |
---|---|
00 | Meaning: Processing completed successfully. Action: None. Be sure to delete the request by issuing the DOM macro. |
02 | Meaning: Processing was not completely
successful. This could be due to inconsistent parameters given to
WTOR, or it could be an environmental problem. Action: A D23 abend has been issued for diagnostic purposes only. No dump has been taken; if a dump is needed, you must set a SLIP trap. Correct any inconsistencies in the WTOR invocation. |
04 | Meaning: Program error. The length
of text for a message line was not correct. Action:
In all cases, correct the problem and retry the request. |
18 | Meaning: Program error. The WPL was invalid
and a symptom record was written to LOGREC to describe the error.
The message was not processed. Action: Correct the WPL. |
WTOR 'USR902A REPLY YES OR NO TO CONTINUE.',REPLY,L8,REPECB, X
CONSID=(R4),RPLYISUR=CONINFO
.
.
.
R4 EQU 4
L8 EQU 8
REPLY DS CL8
REPECB DS F
CONINFO DS CL12
R4 EQU 4
LENG72 EQU 72
.
.
.
LA R4,CATMSG
WTOR TEXT=(CATMSG,REPAREA,LENG72,IDSECB), X
CONSNAME=TOCON, X
RPLYISUR=IDSAREA
.
.
.
CATMSG DC AL2(L'REP99)
REP99 DC C'USR999A ENTER LIST OF USERIDS.'
TOCON DC CL8'ALTCON '
REPAREA DS CL72
IDSECB DS F
IDSAREA DS CL12
R12 EQU 12
C50 EQU 50 LENGTH OF REPLY AREA
USING *,R12
.
.
.
WTOR MF=(E,M2,EXTENDED),TEXT=(MESSAGE,,C50,),CONSID=MYCONID, X
RPLYISUR=MYCONAR
.
.
.
M2 DS 0H
WTOR TEXT=(,RAREA,,MYECB),CONSID=,ROUTCDE=(2),RPLYISUR=,MF=L
MYCONID DS F
RAREA DS CL50
MYECB DS F
MYCONAR DS CL12
MESSAGE DC AL2(L'MTEXT)
MTEXT DC C'USR930A REQUEST IS AMBIGUOUS. RESPECIFY DEVICE.'
END