Previous Topic: Environmental (Event-related) VariablesNext Topic: Static Variables


Dynamic Variables

Dynamic variables are user-defined variables that are created each time a rule section executes. The dynamic variable data is available only when a rule section is executing. You use dynamic variables generally as a reference in the logic of an AOF rule section.

For example, consider the following rule logic:

)MSG $HASP094
)PROC
/************************************************************/
/* Rule Purpose :     Hilite I/O Error messages for Line 50 */
/* $HASP094 I/O LNExx SNA ,17,0000,087D0001,JOB NAME        */
/************************************************************/
LINE = WORD(MSG.TEXT,3)              /* Extract line no.    */
if LINE < > 'LNE50' then             /* Is this LNE50?      */
  return
MSG.DESC = OPSBITS('IMEDACTN')       /* Hilite if it is     */

The variable LINE is an example of a dynamic variable and is only available as each $HASP094 message is processed by this MSG rule.

Review the following additional facts about dynamic variables: