AOFCPMSG

Purpose

The AOFCPMSG command lets you:

  • Capture messages for subsequent display by SDF and the DISPINFO and INGMSGS commands.
  • Delete messages so they are no longer displayed in SDF and the INGMSGS command.
  • Send out a problem or clearing event, if applicable.

Syntax

Read syntax diagramSkip visual syntax diagramAOFCPMSGmessage optionsresource optionsalert optionsCODE3= codedelete options
message options
Read syntax diagramSkip visual syntax diagramSEVERITY=UNUSUALSEVERITY=IGNORENORMALIMPORTANTCRITICALMSG= messageCOMMENT= textCMTMSG=( msgidparm)QUAL= qualifier
resource options
Read syntax diagramSkip visual syntax diagramJOBNAME= jobnameRESOURCE= resname
alert options
Read syntax diagramSkip visual syntax diagramALERT=NOYESINFORM=*INFORM=(,type)
delete options
Read syntax diagramSkip visual syntax diagramDOM=NOYES(msgid)CLEAR=NOCLEAR=YES

Parameters

SEVERITY

Specifies the message severity. The following table indicates where you can see the captured message and its default colors. Green color in DISPINFO is not customizable, while the other default colors in INGMSGS and SDF are customizable.

Severity DISPINFO INGMSGS SDF
IGNORE
NORMAL GREEN
UNUSUAL GREEN YELLOW YELLOW
IMPORTANT GREEN PINK PINK
CRITICAL GREEN RED RED

The default severity is UNUSUAL.

MSG
Specifies a message. It must be an entire message including a message ID followed by message text or just a message ID when used together with the DOM parameter. The message ID must not end with an asterisk and cannot have any commas in it.

If the message contains blanks or special characters, it must be delimited with single quotation marks, double quotation marks, or parentheses.

The default is determined from the msgid() and msgtext() functions against the triggering message.

COMMENT
Specifies a comment text to be associated with the captured message. This text is displayed in SDF and the INGMSGS command.

The comment text must be delimited with single quotation marks, double quotation marks, or parentheses if it contains blanks or special characters.

The COMMENT parameter takes precedence over the CMTMSG parameter.

CMTMSG
Specifies a message from the NetView message catalog to be used as a comment. You specify a message ID and optionally up to four tokens that are used as message parameters p5 to p8. Parameters p1 to p4 are set as follows:
  • p1 – the resource name associated with the message
  • p2 – the current time
  • p3 – the job name associated with the message
  • p4 – the message ID
QUAL
Specifies a qualifier to be associated with the message. It can later be used in the INGMSGS command to identify the message to be deleted.
JOBNAME
Specifies the job name of the resource that issued or is assigned to the message. The default is determined from the jobname() function against the triggering message.
RESOURCE
Specifies the resource name that is to be associated with the message. This is typically specified in the automation manager notation but can also be the subsystem name.

The RESOURCE parameter takes precedence over the JOBNAME parameter if both parameters are specified. If RESOURCE is omitted and no job name is evaluated, the default is MVSESA.

ALERT
Specifies whether a problem or clearing event should be send. The default is NO, unless the severity evaluates to CRITICAL in which case the default is YES.
INFORM
Specifies the target destination where the event should be sent to. The default is the Inform List definition in the automation policy of the associated resource.
CODE3
Specifies the value used as CODE3 by CDEMATCH processing. The default is not to use CODE3 for CDEMATCH.
DOM
Specify YES to delete all captured message instances that match the evaluated message ID.

You can also specify one or more IDs of messages to be deleted. It allows you to capture a message and thereby delete other messages that become obsolete in one step. The message IDs must be separated by a blank character and enclosed in parenthesis or quotes if more than one message ID is specified. The message ID can contain wildcards.

The default is NO, unless the message is detected as a DOM, in which case the default is YES.

CLEAR
Specifies whether messages that are already captured for the evaluated resource should be deleted. No clearing events are sent. CLEAR=YES can be specified without a message being captured. The default is NO.

Restrictions and Limitations

To use the AOFCPMSG command, SA z/OS must be initialized.

AOFCPMSG should only be executed as a NetView automation table command.

Excessive use of AOFCPMSG will reduce storage because messages are stored for subsequent display.

It is recommended that you restrict the use of AOFCPMSG to exception condition messages.

Return Codes

0
The AOFCPMSG command completed successfully.
1
Incorrect parameters were used.
2
The job name could not be resolved to a subsystem and is not MVSESA. System messages are cleared only if the job name is specified as MVSESA.
3
The AOFCPMSG command was called without a message in its default SAFE. This is valid only if CLEAR=YES is specified.
6
Automation is not initialized.

Usage

You should add the AOFCPMSG command to your NetView automation table (AT). However, you can also call AOFCPMSG outside of the AT when specifying the MSG parameter.

The parameters SEVERITY, COMMENT, CMTMSG, ALERT, INFORM, CODE3 and DOM can also be specified via the 'code' definitions of pseudo message ID CAPMSGS in the automation policy. If these parameters are defined in both places (CAPMSGS definitions in the automation policy and AOFCPMSG command), the definitions of CAPMSGS in the automation policy takes preference.

Examples

The following example shows how AOFCPMSG is called from the NetView automation table to default the severity of HSAM1050E message to CRITICAL:
  IF MSGID = 'HSAM1050E'                                                  
       THEN                                                                    
       EXEC(CMD('AOFCPMSG SEVERITY=CRITICAL')ROUTE(ONE * %AOFOPGSSOPER%));     
               
The following example shows how AOFCPMSG is called from the NetView automation table to capture message MYMSG01 with severity IMPORTANT, send an event and, with the same invocation, delete messages MYMSG02 and MYMSG03:
  IF MSGID = 'MYMSG01'                                                  
       THEN                                                                    
       EXEC(CMD('AOFCPMSG SEVERITY=IMPORTANT ALERT=YES DOM=(MYMSG02,MYMSG03)')
       ROUTE(ONE * %AOFOPGSSOPER%));