Predefined Variables

All predefined variables begin with a leading underscore (_) to distinguish them from user-defined variables. However, you can specify the predefined variables DT, IMAGE, MESSAGE, and HOSTID without the leading underscore since they predate this convention.

Descriptions of Predefined Variables

Table 3–1 shows the predefined variables. The case sensitivity of the database does not affect these variables except as noted.

Table 3. Predefined Variables

Predefined Variable

Type

Description

_ALL

String

Contains all members of a specified variable group.

_CONSNAME [CP-AMS]

String

Contains the name of the OS 2200 console that CP-AMS is automating. This name is sent to the console by Server Control or SMC.

_DAY

String

Contains the name of the day of the week; for example, Monday, Tuesday, and so forth.

_DAYNUM

Integer

Represents the day of the week numerically as follows:

1Monday
2Tuesday
3Wednesday
4Thursday
5Friday
6Saturday
7Sunday

_DBNAME

String

Contains the name of the database that is currently active.

_DT

String

Contains the current date and time from the clock in the Operations Sentinel server. The format of this value is mmddyy hhmmss

_ERRORS

Integer

Number of errors encountered while processing the actions for a matched pattern. See Appendix C for more information.

_HOSTID

[SP-AMS]

String

Name of the host that sent the message being processed to the Operations Sentinel server.

_IMAGE

String

Contains the text of the message in the same case as it appears on the console. For OS 2200 console messages, this text includes the read-and-reply number and Exec-prefixed run-id. Contrast with _MESSAGE.

_INSTANCE [CP-AMS]

String

Contains the instance attribute for the message. See the Instance command for more information on the instance attribute. The value is one of the following:

  • PRIMARY – The message is the PRIMARY instance of the message.

  • ECHO – The message is an ECHO copy of the message.

  • NONE – The message does not have an associated instance type. CP-AMS generated messages do not have instance type.

_MESSAGE

String

Contains the text of the original message that AMS uses for pattern matching. For OS 2200 console messages, this does not include the read-and-reply number and leading run-id.

If the database is case insensitive, the value of _MESSAGE is uppercase. Contrast with _IMAGE.

_NEGTOKENn

String

Contains the text of a message token identified by a negative token number. Use a negative token number to count tokens in a message from right to left. n is an integer token number. An alternative way to specify a negative token number is \-n\.

If the database is case insensitive, the token text is uppercase.

_PARTNAME [CP-AMS]

String

Contains the name of the OS 2200 partition operated by the console. This name is sent to the console by Server Control or SMC.

_PTNGROUP

String

Contains the name of the group associated with the matching pattern.

_PTNNUM

String

Contains the pattern number of the matching pattern.

_RRID

[CP-AMS]

String

Contains the unique read-and-reply identifier (RRID) of the matched message. The RRID is an 8-character string assigned by the system console to each read-and-reply message. RRID substitution can be used only with actions associated with read-and-reply patterns.

_RUNID

[CP-AMS]

String

Contains the run-id associated with the matched message. The run-id associated with an Exec message is always blank.

_STATUS

Integer

Result of the previous action. Included in this variable are results from actions specified by the ACTION command, the IF-ELSEIF-ELSE-ENDIF construction, and the SET, RESET, CREATE, and DESTROY commands.

Possible values are

1Warning
0Action executed
-1Error

See Appendix C for more information.

_TOKENn

String

Contains the text of a message token identified by a positive token number. Use a positive token number to count tokens from left to right in a message. n is an integer token number. An alternative way to specify a positive token number is \n\.

If the database is case insensitive, the token text is uppercase.

_TOKENS

Integer

Number of tokens in the message being processed.