Writing a Multiple-Line Message

To write a multiple-line message to one or more operator consoles, either issue WTO with all lines of text, or issue each line of text separately using the CONNECT parameter on the WTO macro.

The CONNECT parameter connects a subsequent message to a previous message. For example, if your program develops a large, multiple-line message of unknown length, it can issue several WTOs for the different parts of the message at different times. The CONNECT parameter forces all these WTOs to use the same message ID, and physically unites the different parts of the message at the display console as a single message. CONNECT is mutually exclusive with CONSID, CONSNAME, and SYSNAME, and SYNCH=YES, and it is not available with WTOR.

You can create with one WTO macro request a message that consists of up to 255 lines. For more than 255 lines, issue more than one WTO macro. The additional lines appear at the end of the message and continue until you specify an “END” line by specifying "DE" or "E" as the line type for the last line of data. For the first request, you must ensure that register 0 is set to zero. If register 0 is not set to zero, WTO assumes that the multiple-line request is adding lines to an existing message, and no new message is created.

After processing the first request, the system places a message identifier in register 1. For each additional request, you must pass this identifier to the subsequent lines through the CONNECT parameter of WTO.