The DEFMSG statement defines a message used in the rules language. During rules and procedure processing, the SET and ISSUE action statements use the WRITEMSG parameter to actually write the message. The DEFDMYU and DEFDMYV statements also use the WRITEMSG parameter to invoke message processing. For a more complete description about message processing, examine Using $DEFAULT on Statement definitions.
Building Messages - The DEFMSG statement builds the message with the use of literal strings and symbolic substitution. The text field must start with a single (‘) or double quote (“), and terminate with the same type of quote. Both character and numeric symbolic fields can be placed in the message. For more information, examine Symbolic fields.
Continuation - Message text cannot be continued onto the next card. Add a plus (+) sign after the end of the text field, and start another quoted text field on the next control card. Message length after substitution is limited to 125 bytes. For more information, examine Continuation.
Copy Messages to SMF - The DEFMSG statement also has the ability to write the message as an SMF record, along with the message. Use the SMFRID parameter to specify the record identifier of the SMF record.
Messages to TSO Users - If an allocation request is made by a TSO user and the message specifies WTORC(11) - write-to-programmer, the TPUT SVC interface will be used to write the message. The product does not use the WTO write-to-programmer interface, because a TSO user can disable delivery with a PROFILE NOWTP command. The TPUT interface will insure that the message is delivered.
If any additional routing codes are specified on WTORC, the WTO SVC interface is used to write the message. The default routing and descriptor codes are set by the WTORC and WTODC parameters on the DEFPROD statement, but can be overridden with operands on the DEFMSG statement. Messages using the WTO SVC interface will appear on the console unless DEFPROD MSG(NOSYSLOG) has been specified.
Messages to Batch Jobs and Started Tasks - If the task being processed by the rules language is a batch job or a started task, the messages can be delivered with two methods: the WTO SVC interface or the JES messages data set. The WTORC specified on the DEFMSG controls message delivery.
By default, the routing code is set to WTORC(11): write-to-programmer. In this condition, a message is written directly to the JES messages data set. When a user examines the job output, the messages will appear among the operating system allocation messages and step completion codes. The message will not appear on the console, or in the system log data set. All ACC and SRS messages are prefixed ACC.
If any additional routing codes are specified on WTORC, the WTO SVC interface is used to write the message. The default routing and descriptor codes are set by the WTORC and
WTODC parameters on the DEFPROD statement, but can be overridden with operands on the DEFMSG statement. Messages using the WTO SVC interface will appear on the console unless DEFPROD MSG(NOSYSLOG) has been specified.
Messages during IDCAMS Processing - When ACC writes a message during IDCAMS DEFINE CLUSTER processing, by default the message is written directly to the SYSPRINT DD statement associated with IDCAMS. This feature also applies to DEFINE CLUSTER commands issued by a TSO user. If the message has any routing code other than WTORC(11), the message is written using the WTO SVC interface.
DEFMSG name ”text”
FILTERRULE ( rulename ) GENID
LEVEL( level ) LOG( ddname ) SMFRID( num ) TRIM
USERID( userid ) WTODC( dcodes ) WTORC( rcodes )
name
Function: This is a required parameter. The name parameter is used by
the WRITEMSG parameter on other rule statements: DEFDMYU DEFDMYV, and DEFRULE. The name defines the link between the statement that wants a message issued and the DEFMSG statement.
The DEFMSG statement can use a special statement name to establish parameter defaults. When $DEFAULT is specified, the rule compiler uses the specified parameters to modify the parameter defaults for later DEFMSG statements. For more information, examine “Using $DEFAULT onStatement definitions.
Default: None
Format: Specify a name 1 to 20 characters long.
”text”
Function: This is a required parameter. The text parameter is used to
define the message being sent to the user. This parameter can use both literal strings and symbolic substitution to build a message. The text field must start with a single (‘) or double quote (“), and terminate with the same type of quote. Text that requires the internal use of a quote should use the opposite type for the text delimiters.
Messages cannot be continued onto the next card. Add a plus (+) sign after the end of the terminating quote, and start another quoted text field on the next control card. Message length after substitution is limited to 125 bytes.
Default: None
Format: “text” or ‘text’
FILTERRULE ( rulename )
Function: This is an optional parameter. The FILTERRULE keyword can
be used to determine whether the current statement is honored by the rule processor. If the rule member requested by FILTERRULE sets the symbolic field RULE_SKIP = YES, then the current rule statement will be skipped. For more information, examine Filter Rules for Rule Statements.
Default: None
Format: Specify the name of a rule member found in the SCC rule library:
DTS.R71.RULELIB.
GENID
Function: The GENID parameter controls the message identifier associated
with the message. By default, no message identifier is displayed with messages produced by the DEFMSG statement. IF GENID has been specified, the message name will automatically be added to the message text.
Default: The default for this parameter is set by the MSG parameter on the
DEFPROD statement.
Format: GENID or NOGENID
LEVEL( level )
Function: The LEVEL parameter on the DEFMSG statement can be used to
assign a level to the message. If no LEVEL is specified and a WRITEMSG is requested, the product will bypass level processing and the message will always be displayed.
Assigning a message level - Messages defined by the DEFMSG statement can be assigned levels of Information, Warning, Action, Error, or Catastrophic.
Message level processing - When the product writes a message, the MSG LEVEL subparameters on the DEFPROD, DEFENV and DEFPOOL
statements determine whether a message gets displayed. Only messages that have the same importance or higher will be displayed. For example, since the DEFPROD statement defaults to MSG(LEVEL(A)), only messages assigned a level of Action, Error, or Catastrophic will be displayed.
Any MSG LEVEL subparameters on the DEFENV and DEFPOOL statements have precedence over the level assigned by DEFPROD. Likewise, any MSG LEVEL on the device pool assigned to the DD statement sets the message level.
The LEVEL parameters on the DEFPROD and DEFENV statements control message processing for allocation requests that are not associated with an ACC controlled allocation request, or an SRS recovery request - no ACC rule has selected a device pool for the DD statement.
Note: If no LEVEL is specified on the DEFMSG statement, the product will bypass message level processing and the message will always be displayed.
Default: None
Format: I, W, A, E or C
LOG( ddname )
Function: You may wish to monitor events that occur when the product is
running. The LOG parameter on the DEFMSG statement allows your rules language to route a copy of the message to a log file allocated in the DIF started task.
If the message should only be forwarded to the log file and not displayed, the ONLY parameter can be specified after the ddname. For example, the following LOG parameter writes the message to the EVNTLOG DD statement in the DIF started task. The message will not be written to the job log.
LOG(EVNTLOG,ONLY)
The DD name can also be mapped to an MQSeries message queue with the DEFCONN statement. For more information, examine “DEFCMD”on page 5-9.
Note: The LOG parameter can also be specified as DDNAME.
Default: The default DDname for this parameter is set by the LOG
parameter on the DEFPROD, DEFENV and DEFPOOL statements.
Format: Any valid DD name
SMFRID( num )
Function: The SMFRID parameter can be used to write a copy of the
message as an SMF record. The record is written in conjunction with the message. If you only want to produce an SMF record, examine the DEFSMF statement.
Default: None
Format: Specify a numeric value between 128-255.
Function: The TRIM parameter controls the message build process. By
default, excess blanks are trimmed from character substitution fields used in the message. For numeric fields, leading zeros are removed. If NOTRIM is specified on DEFMSG, no trimming is performed on character and numeric substitution fields. The NOTRIM parameter allows the DEFMSG statement to build fixed format records.
Default: TRIM
Format: TRIM or NOTRIM
USERID( options )
Function: To allow an easy method of monitoring events encountered in
ACC and SRS control processing, the product can write a copy of a message to a specific TSO userid. The USERID parameter on the DEFMSG statement allows your rules language to route a copy of the message to the requested TSO userid.
If the message should only be forwarded to the userid and not written to the job log, the ONLY parameter can be specified after the userid. For example, the following USERID parameter writes the message to TSO user SD5883. The message will not be written to the job log.
USERID(SD5883,ONLY)
Note: The USERID field supports a special symbolic name (&RUSER). If USERID(&RUSER) is specified as the userid, message processing will substitute the USER field from the job statement of the execution jobstream.
Default: None
Format: USERID( userid ) or USERID( userid, ONLY )
WTODC( dc )
Function: The WTODC parameter sets the descriptor code(s) used on
messages using the WTO SVC interface. Note: Messages written using WTORC(11) are written directly to the JES messages data set, or use the TPUT SVC interface.
Default: The default for this parameter is set by the MSG WTODC
subparameter on the DEFPROD statement.
Format: One or more numbers with values between 1 and 16. The
numbers can be listed individually, or separated by blanks or commas.
WTORC( rc )
Function: The WTORC parameter sets the routing code(s) used on
messages written to batch jobs and started tasks. This parameter also controls how messages are written to TSO users.
The default routing and descriptor codes are set by the MSG WTORC and WTODC subparameters on the DEFPROD statement, but can be overridden with operands on the DEFMSG statement. By default, the MSG WTORC subparameter on the DEFPROD statement sets the routing code to eleven: write-to-programmer.
Messages to TSO Users - If an allocation request is made by a TSO user and the message specifies WTORC(11) - write-to-programmer, the TPUT SVC interface is used to write the message. This insures the message will be delivered to the TSO user.
BATCH Jobs and Started Tasks - Batch jobs and started tasks using WTORC(11) allow the message to be written directly to the JES messages data set. When a user examines the job output, the messages will appear among the operating system allocation messages and step completion codes.
The message will not appear on the console, or in the system log data set.
All Messages with Additional Routing Codes - If any additional routing codes are specified on WTORC for any type of task, the WTO SVC is used to write the message. In this condition, messages will appear on the console.
Note: Different interfaces can be used when multiple routing codes are requested. For example, when writing a message to a TSO user, WTORC(2,11) will force the product to use both TPUT and WTO SVC interfaces when writing a message.
Default: The default for this parameter is set by the WTORC parameter on
the DEFPROD statement.
Format: One or more numbers with values between 1 and 16. The
numbers can be listed individually, or separated by blanks or commas.