Use this system macro to:
- Send critical messages to the system consoles
- Write critical messages to the system consoles through the common
input/output (I/O) priority request (PIOFC).
Mainline communications queuing is bypassed and the messages are written
through the preemptive I/O facility. You can call this macro only
in C-type (control program) modules. All CWRTC messages are preceded by
the CSMP97I header if the SYSTC SBPRMSG switch is set.
Normal I/O for the central processor complex (CPC) is suspended until
the console write operations are complete.
The macro function varies slightly, depending on whether the system
includes 1052/3215 console support, or (3270) native console support.
If 1052 support has been generated, then the macro will write to the 1052
console, and sound the alarm. If native console support has been
generated, then the macro will write to the 327x CRT system console, sound the
alarm, and also copy the message on the associated 328x printer (RO).
Format
- label
- A symbolic name can be assigned to the macro statement.
- MSG
- It must be coded in one of the following ways;
MSG=(register)
MSG=label
MSG='literal'
- (register)
- The specified general register must point to the message formatted as
below:
DC AL1(Length of message)
DC C' .. message text .. '
The TEXTONLY option of the GENMSG macro may be used to generate the text in
the required format.
- label
- If coded, then at that location must be the message formatted as
above.
- 'literal'
- The macro will generate (inline) a correctly formatted message.
- TIME=YES|NO
- It may be coded as YES or NO. NO is the default. If YES is
specified, an 8-byte time stamp (of the HH.MM.SS format) will be
inserted ten bytes into the message text.
If NO is specified or defaulted, the message will be sent unaltered.
- ENDOFM
- It may be coded as YES or NO. If neither ENDOFM nor ENDOFMR is
specified, YES is the default. This parameter only affects 1052/3215
console support. This parameter is mutually exclusive with the ENDOFMR
parameter.
- YES
- An end-of-message-complete character (EOMC) is added at the end of the
message.
- NO
- An EOMC character is not added at the end of the message.
- ENDOFMR=(Rn)
- This parameter only affects 1052/3215 console support. If the
right-most byte of the specified register is 0, an EOMC character is added at
the end of the message. Otherwise, no EOMC is added at the end of the
message. This parameter is mutually exclusive with the ENDOFM
parameter.
- CSMP97I=YES|NO
- Specifies whether the message will be preceded by the CSMP97I header if
the appropriate SYSTC switches are set. This facility is intended for
use when writing multiline messages. The default is CSMP97I=YES.
CSMP97I=NO should not be coded for the first line of a message, unless the
calling program has verified through the SYSTC switches that the CSMP97I
header is not required.
- ROUT=(code1 [,code2 [,code3 ]])
- Up to three routing codes, as defined in the Functional Support Console
Routine Codes segment (RTCEQ), may be specified. This facility is
intended for use in writing status messages which need not be logged to all
three operator consoles. Only the codes PRC, RO and AUDT are
supported. The default is ROUT=(PRC,RO,AUDT).
- DSECT=YES
- This form of the macro is used to generate a DSECT which describes the
macro parameters. It is intended for use in the system error CSECT
only.
Entry Requirements
- General register 14 must be available.
- The TPF system should be masked so that no I/O interrupts will be
processed during the processing of this macro.
Return Conditions
- Control is returned to the next sequential instruction.
- The condition code is unknown.
- There is no indication as to whether the attempted console write was
successful.
- The contents of R14 is unknown. The contents of all other registers
are preserved across this macro call.
Programming Considerations
- This macro must be processed on the main I-stream only.
- This macro may be called only by the main storage resident control program
(CP), and should be used only for messages of the highest priority.
This macro is for use in the control program (CP) only.
- General register 14 is used in the macro expansion and may not be used to
specify the address of the message or as the ENDOFMR register.
- The storage key in the PSW must be such that alteration of protected
storage is permitted (that is, Key 0 or F).
- The length of the message may be no more than 255 characters. If an
EOMC is to be added (see the ENDOFM/ENDOFMR parameters), the message may be no
more than 254 characters. If CSMP97I=YES is coded, the message may be
no more than 200 characters.
- If native console support is included, or the 1052/3215 console has been
replaced by a local 3270 type device through the ZACRS command, then the
message will be reformatted appropriately.
- Only locally attached console devices are supported by the CWRTC macro,
that is, subchannel attached 1052/3215, native console, and local
3270s. Network devices are NOT supported. The macro service
routine will determine whether or not the console is a network device, and if
it is, no message will be sent.
- The CWRTC macro cannot be issued until after the required tables have been
initialized by segment CT60 of CTIN. (LINEQ, SLSTL, CR0AT, CX7CW,
CX8CW)
- If the MSG parameter is coded as (register), the macro will generate
relocatable code. If the MSG parameter is not coded as (register), the
macro expansion will include a relocatable address constant.
Examples
- An example showing a warning message with the identifying message code
WARN96W and text WARNING. The time shown by 00.00.00 is
replaced by the actual time the message is issued.
CWRTC MSG='WARN96W 00.00.00 WARNING',TIME=YES
- An example showing a line of message text with no time stamp. An
end of message character is appended to the end of the text.
CWRTC MSG='JUST LIKE THIS',TIME=NO,ENDOFM=YES
- An example showing the use of register R0 to point to the message
text.
LA R0,ERROR
CWRTC MSG=(R0)
.
.
.
ERROR DC AL1(L'ERRMSG) LENGTH OF THE TEXT
ERRMSG DC C'THIS IS AN ERROR MESSAGE' MESSAGE TEXT
- An example showing two messages being sent. At the end of the first
one (LINE1) there is no end of message character applied, while there is one
applied at the end of the second (LINE2) due to the 0 in the rightmost byte of
R4.
LA R4,1
CWRTC MSG=LINE1,ENDOFMR=(R4)
SR R4,R4
CWRTC MSG=LINE2,ENDOFMR=(R4)
- An example showing two messages being sent. On the first line
(TESTMSG1) the time is replaced for 00.00.00 and the message
code CSMP97I is appended on the front of the message (CSMP97I ABCD0001E
...). This assumes the proper SYSTC switch is
set. The message is sent to the prime CRAS console. The second
message consists only of the message text and this too is sent to the prime
CRAS.
(5) CWRTC MSG=TESTMSG1,TIME=YES,CSMP97I=YES,ROUT=(PRC)
CWRTC MSG=TESTMSG2,TIME=NO,CSMP97I=NO,ROUT=(PRC)
.
.
.
TESTMSG1 DC AL1(L'MSG1TXT)
MSG1TXT DC C'ABCD0001E 00.00.00 ERROR IN TEST CASE 1'
TESTMSG2 DC AL1(L'MSG2TXT)
MSG2TXT DC C'XYZ TABLE NOT INITIALIZED'
producing the message
CSMP97I ABCD0001E xx.yy.zz ERROR IN TEST CASE 1'
XYZ TABLE NOT INITIALIZED'