# WTO (Write-To-Operator)

## Syntax:

    WTO(msgtxt[,msgcount][,route][,desc])

## Arguments:

msgtxt
  if msgcount is omitted or is zero, msgtxt is the 1 to 125 character text of the message to be written to the system operator's console. If msgcount is greater than zero, msgtxt is interpreted as the stem name of the variables which contain the message lines. If the stem name is a true REXX stem (i.e., it contains a dot), you must code the dot in msgtxt.

  Notes:

  1. The variables specified by msgtxt and msgcount will be written to the console until msgcount is reached or a null or un-initialized variable is encountered.
  2. If the stem format is used (i.e., msgcount > 0) the value of each message line will be padded or truncated to 70 bytes as necessary.
msgcount
  is a REXX printable integer between zero and ten. If msgcount is greater than zero, it represents the number of stem variables, named by msgtxt, that contain the messages to be written to the operator's console.
route
  the routing codes for this message. Each routing code is a REXX printable integer between one and twenty. If more than one routing code is specified, they must be enclosed within parentheses and separated by commas. See "Specifying Routing Codes" for more information.
desc
  the descriptor codes for this message. Each descriptor code is a REXX printable integer between one and sixteen. If more than one descriptor code is specified, they must be enclosed within parentheses and separated by commas. See "Specifying Descriptor Codes" for more information.

## Module Name:

SWXWTO

## Service Description:

The WTO (Write-To-Operator) function is used to write messages to MVS system consoles. There are two formats for this function. The first format, where msgcount is omitted or is zero, causes the system to write a single line WTO to one or more system consoles. In addition the message will be recorded in the system log.

The second format, where msgcount is greater than zero (but less than 10), causes the system to use the MLWTO (Multi-Line WTO) format. The MLWTO format sends messages to the console grouped together, and prevents other WTO messages from appearing inside the group.

For a more detailed discussion of this topic, see "Communicating with the System Operator" in the IBM publication, MVS/ESA Assembler Programming Guide, GC28-1644.

WARNING: If your program writes large numbers of WTO messages to the operator console, you may impair the ability of system operators to manage the system. In addition, depending on the size of the console buffers, you could cause a console buffer shortage condition.

## Returned Information:

The WTO function returns the WTO ID number. The WTO ID number may be used with the DOM (Delete-Operator-Message) function to remove WTOed messages. If you CALL the WTO function, the returned value is contained in the RESULT special variable. In addition, the REXX special variable, RC, is also set to contain the WTO macro return code.

The following WTO return code values are possible:

0
  operation successful.
48
  routing code 11 was specified, but the resource required was not available. Other route codes for the same message are processed normally.

## Examples:

1. Call the WTO function to send a single line message to the tape pool:

       call wto 'Starting IEHINIT job. Get scratch',, 3

2. Call the WTO function to write a 3 line high intensity (non-scrollable) message:

       mline.1 = '**********************************'
       mline.2 = '******* Application failed *******'
       mline.3 = '**********************************'
       call wto 'mline.', 3,, 2

© Copyright 1998 by Open Software Technologies, Inc.