Previous Topic: Environmental Variable Values

Next Topic: Status Variables


Valid Environmental Variables

Environmental variable names begin with an ampersand (&). The following table lists the valid environmental variables that can be used in CA Automation Point rules. Special notes are included for events that are extracted from CA NSM or the Windows event logs, and for messages generated by CA OPS/MVS.

&AP_ACTIVE_RULES

Specifies the name of the active rules file.

&AP_PARMFILE

Specifies the name of the active session definition set.

&CMD

Specifies the first line of the command text.

&DATE

Specifies the current system date for the workstation in the form mm/dd/yy.

&DAY

Specifies the current day of the week for the workstation in the form SUN, MON, TUE, WED, THU, FRI, or SAT.

&DOMID

Specifies the internal pointer to the current action message.

&EMSDATE

Specifies the date contained in the first eight characters of a Tandem EMS message.

&FOCUS_WIN

Specifies the desktop window that is the currently active window. This variable is only set in the menu. It is unavailable in rules, REXX, and all other areas of CA Automation Point.

&HAFHMC

Specifies the name of the HMC that generated this HAF message.

&HAFMSGNUM

Specifies a six-digit number that is incremented each time a message is received by HAF from an HMC. Each HMC has its own counter; that is, you will see message number 000001, message number 000002, and so on from each HMC. This value is useful because many HMC messages must be split up into multiple HAF messages so they can be presented properly (see the description of HAFMSGSEQ). This number allows you to relate the pieces of an HMC message to one another in the rules that you write.

&HAFMSGSEQ

A single HMC message often needs to be split into several HAF messages. HAFMSGSEQ is a six digit number that starts with a value of 000001 for each new HMC message. It is incremented for each new message that HAF creates when presenting the HMC message. As with HAFMSGNUM, you can use this to relate the pieces of an HMC message to one another in rules. HMC messages are split for one of two reasons; either the HMC message itself contains formatting characters that request that the HMC message be split into multiple HAF messages, or the HMC message contains more data than can be passed into rules in a single HAF message. Each HAF message in a multi-line HMC message has the same message ID (HAFxmmnn) and the same message number (&HAFMSGNUM), but &HAFMSGSEQ will be incremented by one for each HAF message that is generated from the HMC message.

&HAFMSGTYPE

A single HMC message often needs to be split into several HAF messages (see &HAFMSGSEQ). HAFMSGTYPE is set to LAST if this is the only HAF message or last HAF message for an HMC message. It is set to FIRST if this is the first HAF message for an HMC message that has been split into more than one HAF message. It is set to MIDDLE if either of the two preceding conditions is not met.

&HAFOBJECT

In HMC terminology, specifies the name of the object that this HMC message is describing. Typical HMC objects are CPCs, LPARs, profiles, and IOCDSs.

&HOSTTIME

Specifies the time when a message is received from the host or when a command is issued. It is in the form hh:mm:ss. If the &HOSTTIME value is not available, CA Automation Point uses the &TIME value.

CA NSM and Windows Events:

Specifies the time at which the event was generated.

&JES3NAME

Specifies the system name of a JES3 GLOBAL or sysplex console (parsed from the JES3 or sysplex message stream).

&JOBID

Specifies the current JES job ID associated with the message or command. This variable is available for session types MCS, RCS, and VM.

CA NSM Event:

Specifies the TCP/IP address of the device that sent an SNMP trap.

Windows Event:

Specifies the Windows event log ID.

&JOBNAME

Specifies the job name of the address space that issued the message or command. This variable is available only for JES3 sessions and certain types of VM messages.

CA NSM Event:

Specifies the value from the CA NSM Process field; this field normally contains the value "ProcessID,ExecutableName".

Windows Event:

Specifies the name of the source (application, service, driver, subsystem) that generated the event.

&JULDATE

Specifies the current date for the workstation in Julian format: yyddd, where ddd can be 001 to 366.

&LDATE

Specifies the current system date for the workstation in the form mm/dd/yyyy.

&LJULDATE

Specifies the current date for the workstation in Julian format: yyyyddd, where ddd can be 001 to 366.

&MONNAME

Specifies the source system name for a DataFrame message.

CA NSM and Windows Events:

The name of the host that generated the event.

CA OPS/MVSCA OPS/MVS:

Specifies the name of the CA OPS/MVS Multi‑System Facility (MSF) that generated the message.

&MONNUM

Specifies the source system number for a DataFrame message.

CA NSM Event:

Specifies the name of the CA NSM Event Manager host from whose log the event was extracted.

Windows Event:

Specifies the name of the Windows host from whose logs the event was extracted.

CA OPS/MVS:

Specifies the system ID of the Event Notification Facility (ENF) that issued the WTO.

&MONPRTY

Specifies the priority of the alert message issued by the DataFrame system.

CA NSM Event:

Error, Warning, Info, Success, or Failure.

Windows Event:

Error (error event), Warning (warning event), Info (information event), Success (successful audit event), or Failure (failure audit event).

CA OPS/MVS:

If specified, the console name indicated on the CA‑OPS/MVS ADDRESS WTO command.

&MONTYPE

Specifies the type of alert message issued by the DataFrame system.

CA NSM Event:

Twenty bytes from the CA NSM Facility field are combined with twenty bytes from the Category field, resulting in a value of "Facility,Category".

Windows Event:

Specifies the name of the Windows event log (System, Application, or Security) from which the event was extracted.

&MSG

Specifies the first line of the message text.

&MSGTYPE

Specifies the type of message, either NORMAL or ACTION.

&PREMSG

Valid in asynchronous sessions only, this keyword contains the text of the message prior to the position specified in the Begin Message fields in the session definition. (See the Configuration Manager HTML help for more on these fields.)

&REPLYID

Specifies the reply number for a message that is a WTOR (write-to-operator with reply). The value is null if the message is not a WTOR.

&SESSION

Specifies the name of the session from which the message or command was issued. If the message was issued by CA Automation Point itself, the session name will be AXC. If the message was issued by the Notification Server, the session name will be VOX. If the message was received through the CA-OPS/MVS Interface, the session name will be OPS.

&SYSNAME

Specifies the default system name specified for the session.

&TIME

Specifies the current time for the workstation in the form hh:mm:ss.

&WORDn

Specifies each word in the message or command text, where n is a number from 1 to 85. (&WORD0 is not a valid variable name.) For example, &WORD1 is the first word in the message text and &WORD50 is the fiftieth word in message text. Only the first 85 words of a message or command are available to CA Automation Point. A message or command containing ten words causes CA Automation Point to store a null value in variables &WORD11 through &WORD85.

The value stored in the &WORDn variable can be as long as the entire message or command. When parsing message or command text into words, CA Automation Point recognizes blank spaces or commas as delimiters between words. If the message or command contains no blanks or commas, the &WORD1 variable stores the whole message or command as a single word.

WARNING! Spaces in session names and/or file names will affect word count and position. You must account for this when you write rules against CA Automation Point messages or commands.

&USER

Valid for CMDIN rules only, this keyword contains the logon information in the form of logon_name@logon_node of the user who issued the command remotely. It is blank for local users using the CA Automation Point desktop.

&XC_VER

Specifies CA Automation Point version information.