This topic shows one way of monitoring the QSYSOPR message queue.
When the system is started, it puts the QSYSOPR message queue in break delivery when the controlling subsystem is started. However, if the system operator signs off, the message queue is put in hold delivery. When the system operator signs on again, QSYSOPR is placed in the mode specified in the QSYSOPR user profile.
The following procedure in a CL initial program can be used to place the QSYSOPR message queue in break mode. Initial programs can use similar procedures to monitor message queues other than the one specified in a user's own user profile.
PGM /* Procedure to place a msg queue in break mode */ CHGMSGQ QSYSOPR DLVRY(*BREAK) SEV(50) MONMSG MSGID(CPF0000) EXEC(SNDPGMMSG MSG('Unable to put QSYSOPR + message queue in *BREAK mode') TOPGMQ(*EXT)) ENDPGM
The procedure attempts to set the QSYSOPR message queue to break delivery with a severity level of 50. If this is unsuccessful, a message is sent to the external job message queue (*EXT). When the program which contains this procedure ends, the initial menu is displayed. A severity level of 50 is used to decrease the number of break messages that interrupts the workstation user. A common reason for failure is when another user has QSYSOPR in break mode already.
You can use the system reply list to specify that the system issue the reply to specified predefined inquiry messages so that the display station user does not need to reply.