Global variables are variables that can be shared by multiple AOF rules, OPS/REXX programs, or both running in different address spaces.
Global variables are also compound symbols with any of the following stems:
Note: The n is a single digit or letter.
Use global variables as you would any other OPS/REXX variable.
The CA OPS/MVS product uses two types of global variables: standard and temporary. Standard global variables are checkpointed to data-in-virtual data sets. Temporary global variables are not checkpointed, and they do not exist across IPLs or restarts of CA OPS/MVS. The stems GLVTEMPn., GLVEVENT., and GLVJOBID. all identify temporary global variables.
The difference among the temporary global variable stems is the variable duration that each indicates. Consider this:
For example, if variable GLVEVENT.MSGTEXT is created during the processing of a message IEF405I rule, it exists for all rules that process that particular IEF405I message.
The GLVEVENT. stem might come in handy, for instance, if you want to pass data between rules that are processing the same event, or to accumulate data of interest during the processing of the event.
After the last rule to process the event finishes executing, the variable is deleted. The value of a GLVEVENT. variable is not shared across events-for example, the GLVEVENT.MSGTEXT variable described here will not exist when the next IEF405I message is processed by the same rules.
For example, if variable GLVJOBID.MSGTEXT is created during the processing of a particular job, it exists for the time during which the job is active (unless it is explicitly deleted).
As an example, you could use a GLVJOBID. variable to save data generated during one event created by the job (such as when the job issues a particular message), which could then be used to automate another action taken by the same job.
When the address space that created the GLVJOBID. variable terminates, the variable is deleted. The value of a GLVJOBID. variable is associated with only one address space; for example, references by different jobs to the GLVJOBID.MSGTEXT variable described here will have different values.
For a detailed description of uses and characteristics of both temporary and standard global variables, see the chapter “Global Variables Explained.”
Note: Because we may add other types of global variables in the future, avoid giving OPS/REXX variables stems that begin with the characters GLV.
Copyright © 2014 CA.
All rights reserved.
|
|