Description

Note: IBM® recommends you use the WTO macro with the MCSFLAG=HRDCPY parameter instead of WTL, because WTO supplies more data than WTL.

The WTL macro causes a message to be written to the system log (SYSLOG) or the operations log (OPERLOG) log stream depending on which one of these logs, or both, is active.

Note: When a message is recorded in SYSLOG, the exact format of the output of the WTL macro varies depending on the job entry subsystem (JES2 or JES3) that is being used, the output class that is assigned to the log at system initialization, and whether DLOG is in effect for JES3. See the following for information on the format of logged messages:

z/OS JES3 Commands also contains information on the format of logged messages.

Environment

The 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-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.

Programming requirements

None.

Restrictions

Message text cannot exceed 126 characters. If the message text exceeds 126 characters, truncation occurs at the last embedded blank before the 126th character; when there are no embedded blanks, truncation occurs after the 126th character.

Input register information

Before issuing the WTL 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.

Output register information

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code
1-14
Unchanged
15
Return code
When control returns to the caller, the access registers (ARs) contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

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.

Performance implications

None.

Syntax

The standard form of the WTL macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede WTL.
   
WTL  
   
One or more blanks must follow WTL.
   
‘msg’ msg: Up to 126 characters.
   

Parameters

The parameter is explained as follows:

‘msg’
Specifies the message to be written to the system log and/or the operations log. The message must be enclosed in apostrophes, which will not appear in the system log. The message can include any character that can be used in a C-type (character) DC statement, and is assembled as a variable-length record. See "Timing and Communication" in z/OS MVS Programming: Assembler Services Guide for a list of the printable EBCDIC characters passed to display devices or printers.

ABEND codes

None.

Return and reason codes

When the WTL macro returns control to your program, GPR 15 contains a return code and GPR 0 contains a reason code. WTL issues a return code (either 00 or 04), with multiple reason codes for each. The return codes indicate the following:
  • 00 - WTL wrote the message to the system log, the operations log, or both.
  • 04 - WTL could not write the message to either the system log or the operations log.
Return Code Reason Code Meaning and Action
0 None Meaning: WTL processing completed successfully. The system logged the message in SYSLOG, and, if OPERLOG was requested, the system logged the message in OPERLOG.

Action: None.

0 04 Meaning: WTL processing completed successfully. The message was logged in the operations log (OPERLOG log stream). The system log was not active.

Action: If you want the message logged in the system log, start the system log and rerun the program.

0 08 Meaning: WTL processing completed, but the message was only logged in the operations log because the WTL system log buffers are full.
Action: Do one of the following, if you want subsequent messages logged in the system log:
  • Enter a CONTROL M,LOGLIM command to change the allocated number of WTL system log buffers dynamically.
  • Change the LOGLIM value, specifying the number of WTL system log buffers on the INIT statement in the CONSOLxx parmlib member. This value will take effect at the next IPL.
0 0C Meaning: WTL processing completed, but the message was only logged in the system log because the operations log was not active.

Action: If you want the message logged in the operations log, start the operations log and rerun the program. This will also place the message in the system log.

0 10 Meaning: WTL processing completed, but the message was only logged in the system log. The message was not logged in the OPERLOG log stream because of a storage problem.

Action: If you want the message logged in the operations log, retry the request. This will also place the message in the system log. If the problem persists, contact the IBM Support Center. Provide the return and reason code.

04 04 Meaning: System error. WTL processing was not successful. Recovery could not be established.

Action: Retry the request. If the problem persists, record the return and reason code and supply them to the appropriate IBM support personnel.

04 08 Meaning: Environmental error. The system log and the operations log are not active.

Action: Start the logs and rerun your program.

04 0C Meaning: Environmental error. The WTL limit has been reached.
Action: Do one of the following:
  1. Retry the request when the shortage is relieved.
  2. Issue a CONTROL M,LOGLIM command to change the allocated number of WTL SYSLOG buffers.
  3. Change the LOGLIM value on the INIT statement in the CONSOLxx member of SYS1.PARMLIB. This new value will take effect at the next IPL.
Note: If the problem is persistent, you might want to perform step 2 first and step 3 at the next IPL.
04 10 Meaning: System error. An internal error occurred. The system issues message IEE390I.

Action: Contact the IBM Support Center. Provide the return and reason code.

04 14 Meaning: System error. The system encountered a (VSM) error. The system issues message IEE390I.

Action: Contact the IBM Support Center. Provide the return and reason code.

04 18 Meaning: Environmental error. The message was not logged in either the system log or the operations log, because neither log is active.
Action: Do one of the following:
  • If you want to log the message in the operations log, start the operations log with the VARY OPERLOG,HARDCPY command and rerun the program.
  • If you want the message logged in the system log, start the system log (SYSLOG) with the VARY SYSLOG,HARDCPY command and rerun the program.
04 1C Meaning: Environmental error. The message was not logged in the system log, as requested, because the WTL limit has been reached. The operation log was not active at the time, so the message was not logged there either.
Action: To log the message in the system log, do the following:
  • Issue a CONTROL M,LOGLIM command to change the allocated number of WTL SYSLOG buffers.
  • Change the LOGLIM value on the INIT statement in the CONSOLxx member of SYS1.PARMLIB. This new value will take effect at the next initialization.
  • Retry the request when the storage shortage has been relieved.
If the problem persists, issue the CONTROL M,LOGLIM command first, and change the LOGLIM value in CONSOLxx at your next IPL.

To log the message in the operations log, start the operations log and rerun the program.

04 20 Meaning: Environmental error. The message was not logged in the operations log, as requested, because of storage problems. The system log was not active.

Action: To log the message in the operations log, retry the request. If the problem persists, contact the IBM Support Center, providing the return and reason codes.

To log the message in the system log also, start the system log and rerun the program.

04 24 Meaning: Environmental error. The message was not logged in the system log because the WTL limit has been reached, and was not logged in the operation log because of storage problems.

Action: To log the message in the operations log, retry the request. If the problem persists, contact the IBM Support Center, providing the return and reason codes.

Example 1

Write a message to the system log.
WTL   'THIS IS THE STANDARD FORMAT FOR THE WTL MACRO'

Example 2

Write a message constructed in the list form of WTL.
WTL   MF=(E,(R2))