Use the WRITE statement to issue a message to an end user at execution and allocation time. With the WRITE statement, you might notify end users that you are removing a particular storage class, you might inform end users that they lack sufficient authority to use a particular management class, or you might tell an end user that you have moved a tape data set to DASD.
In a TSO/E ALLOCATION environment, the text of the WRITE message displays only if the allocation fails.
Under certain conditions related to data set stacking, SMS invokes ACS routines more than once. Consequently, you might want to take special care when using WRITE statements in order to avoid duplicates in the job log.
A WRITE message can contain up to 110 characters of text and variables. The message substitutes the value of a variable for a variable name. With the exception of &ANYVOL and &ALLVOL, you can use any of the read-only variables in write statements. All numerical values are in hexadecimal when displayed in write statements.
You must enclose the message in single quotation marks. If you want a single quotation mark to be part of the message, use two single quotation marks to represent it.
You can use continuation characters (+, -) to continue text or a literal onto a subsequent line. The closing single quotation mark signifies the end of text. A variable can be referenced on a subsequent line after the closing quotation mark without a continuation character.
WRITE 'This line''s short.'
displays
as:
This line's short.
WRITE 'THE DATACLAS IS EQUAL TO'
&DATACLAS
displays as:
THE DATACLAS IS EQUAL TO DEFAULT
A nine-character system message id and a single blank character precede your message to the end user. At execution and allocation time, an end user can receive a maximum of five messages. If any more messages are generated, a sixth and final message indicates that additional messages have been generated, but the additional messages are not displayed.
WRITE 'WARNING - &STORCLAS SPECIFIED (' &STORCLAS ') IS NOT ALLOWED'
displays
as:
IGD01005I WARNING - &STORCLAS SPECIFIED (SC1) IS NOT ALLOWED
WRITE ' &STORGRP IS '&STORGRP' '
displays:
IGD01010I &STORGRP IS SG1
WRITE '&STORGRP SET TO SG1, SG2 AND SG3 '
displays:
IGD01010I &STORGRP SET TO SG1, SG2 AND SG3