The user exit casmguex controls whether a particular message is output to the console or not.
To enable the user exit, it must be in a directory included on the appropriate program search concatenation. casmguex is then invoked by the SEP before sending the processed message to the console daemon.
The entry point of casmguex is a single parameter defined as a group item:
03 MsgRB-Buffer.
05 MsgRB-Buffer-Length pic x(2) comp-x value 256.
05 MsgRB-Buffer-Text.
07 MsgRB-Buffer-Char pic x
occurs 256 times depending on MsgRB-Buffer-Length.
The user exit examines the message and then determines whether to display it in the console or not. This is controlled through the use of return-code using the following values:
The following sample program shows how you can use casmguex to prevent the error message FC0009I from showing:
identification division.
program-id. casmguex.
environment division.
configuration section.
data division.
working-storage section.
local-storage section.
linkage section.
01 MsgRB-Buffer.
03 MsgRB-Buffer-Length pic x(2) comp-x.
03 MsgRB-Buffer-Text.
05 MsgRB-Buffer-Char pic x
occurs 256 times depending on MsgRB-Buffer-Length.
procedure division using MsgRB-Buffer.
move 1 to return-code
if MsgRB-Buffer-Text(4:7) = 'FC0009I'
move 0 to return-code
end-if
goback.
end program casmguex.