Suppressing Unwanted System Messages

Although system messages are intended to be helpful, there can be situations where you might find it more convenient to suppress the display of certain messages.

Deimplementation warning messages are a good example of this principle. The system issues a deimplementation-warning message for a process when the process uses a feature that has been scheduled for future deimplementation. These warning messages can be very valuable because they help you to identify programs that need to be modified before you can migrate your system to a new release.

However, the system displays these deimplementation warnings each time the program is run. If you run the program frequently, you may see the warning messages more often than you care to be reminded of the pending deimplementation. You can suppress the messages by using the SUPPRESSWARNING task attribute. This attribute enables you to specify a list of warning message numbers or number ranges, as in the following example:

RUN OBJECT/PROG;SUPPRESSWARNING = “1,4,8-10”;

You can learn the identifying number for a message in either of two ways. First, you can note the warning number when it appears in the message itself. For example, after seeing the following message, you might assign SUPPRESSWARNING a value of 156:

WARNING 156: The TCPNATIVESERVICE mnemonic of the SERVICE file attribute
will be deimplemented in software released after April 30, 2002.

Second, you can interrogate the TASKWARNINGS task attribute. This task attribute returns the value of the WARNINGS file attribute of the object code file that is being executed. The WARNINGS file attribute, in turn, stores the message numbers for all the warning messages that the system has ever displayed for processes executing code from that object code file. The following is an example of a declaration and statements you can use in an ALGOL program to suppress all previously displayed warning messages:

EBCDIC ARRAY WARN[0:999];
REPLACE WARN BY MYSELF.TASKWARNINGS;
REPLACE MYSELF.SUPPRESSWARNING BY WARN;

The SUPPRESSWARNING task attribute suppresses warnings for only a single process. You can suppress selected warnings for all processes on the system by using the SUPPRESSWARNING system command. A particular warning is suppressed for a process if either the SUPPRESSWARNING system command or the SUPPRESSWARNING task attribute indicates that the warning is to be suppressed.

You might also find it useful to suppress DISPLAY messages. A process issues a DISPLAY message by executing a DISPLAY statement. DISPLAY messages are used to enable a process to communicate information to the user without actually opening a remote file or ODT file. DISPLAY messages appear in the MSG (System Messages) system command display, at the terminal of the user that initiated the process, and in the system log.

If a process is initiated by a user at a data comm terminal, the DISPLAY messages issued by the process are probably of interest only to that user. The appearance of these messages in the MSG display can be a needless distraction to the system operator. You can eliminate this distraction by setting the DISPLAYONLYTOMCS task attribute to TRUE for the process. When this attribute is TRUE, if the process is initiated from a data comm terminal, DISPLAY messages appear at the originating terminal but do not appear in the MSG display at the ODT.

The DISPLAYONLYTOMCS task attribute affects only the DISPLAY messages generated by a single process. However, you can use the command ?SO DISPLAYONLYTOMCS to establish a default of DISPLAYONLYTOMCS = TRUE for the current CANDE session.

Further, you can use the CANDE control command ?OP + DISPLAYONLYTOMCS to set a global default of DISPLAYONLYTOMCS = TRUE for all CANDE sessions. For information about CANDE control commands, refer to the CANDE Operations Reference Manual.

The SUPPRESSWARNING and DISPLAYONLYTOMCS task attributes enable you to control certain message displays. You can control a broader range of message displays by using the MSC (Message Control) command in MARC. A user with SYSTEMUSER or SYSADMIN status can use the MSC system command to suppress messages for all processes with a particular usercode, charge code, mix number, or job number. The MSC system command can also suppress selected types of messages, including DISPLAY messages, particular warning messages, or other common messages. For details, refer to the Menu-Assisted Resource Control (MARC) Operations Guide. The MSC system command can also be entered from the ODT.