Whenever a job (or SMART Table Entity) creates a Global variable and places it in the IOA Global Variable database, it assigns an owner to the variable.
The job that creates the variable can assign itself as the owner (for example, JOBA defines a Global variable that is assigned to JOBA), but it does not have to do this. It can, instead, assign a different owner to the variable (for example, JOBA defines a Global variable that it assigns to GROUP_ABC).
In fact, when a Global variable is created, it can be assigned to any component (job, group, application, or even to Control-M) in the database. It is this ability to assign variables that makes the structure of the IOA Global Variable database so important.
The hierarchical structure of the IOA Global Variable Database, described above, is similar to the directory and subdirectory structure in Unix and DOS. Therefore, the same path structure and syntax that is used to describe directories and subdirectories is used to define and identify Global variables.
Note the following points about Global variable assignment and syntax:
Example
%%\product\application\group\job\variablename
Example
Due to the different paths, the following variables are all different from each other:
%%\M\APP_1\TBL_1\JOB_A\VAR_XYZ
%%\M\APP_1\TBL_1\JOB_B\VAR_XYZ
%%\M\APP_1\TBL_1\VAR_XYZ
Example
If JOB1 job with TBL_A group, which belongs to application APP_1, then the following SET VAR statement in JOB1:
SET VAR=%%\PROBID=123
creates the following variable assigned to JOB1 (with the indicated full path):
%%\M\APP_1\TBL_A\JOB1\PROBID=123
Example
If JOB1 with TBL_A group, which belongs to application APP_1, then the following SET VAR statement in JOB1:
SET VAR=%%..\PROBID=123
creates the following variable assigned to TBL_A (with the indicated full path):
%%\M\APP_1\TBL_A\PROBID=123
Example
Assume SMART Table Entity with TBL_A assigns variable %%A, with a value equal to 7, (%%A = 7) to JOB2 job. The following statement indicates the syntax of the %% SET statement:
//* %%SET %%\JOB2\A=7
Example 1
Assume JOB1 job with TBL_A group assigns variable %%A (with a value equal to 7) to JOB2 job in the same group (and assume the group has no application). Any of the following statements can be specified:
//* %%SET %%..\JOB2\A=7
//* %%SET %%\M\NO_APPL\TBL_A\JOB2\A=7
Example 2
Assume JOB1 job, with TBL_A group, which is in application APP_A, assigns variable %%A, with a value equal to 7, to JOB2 job with TBL_B group and which does not have an application.
Either of the following %% SET statements work:
//* %%SET %%\M\NO_APPL\TBL_B\JOB2\A=7
//* %%SET %%..\..\..\NO_APPL\TBL_B\JOB2\A=7
Example
Assume JOB1 job with TBL_A group is run before JOB2 job with the same group (and both belong to application APP_A).
If JOB1 contains the following SET VAR statement:
SET VAR=%%..\A=7
and JOB2 contains the following SET VAR statement:
SET VAR=%%..\A=8
At the end of the job run for JOB2, the IOA Global Variable database contains the following variable (assigned to TBL_A):
%%\M\APP_A\TBL_A\A=8
Example
Assume JOB1 job contained the following statement that assigned the following variable to JOB2:
DO SET VAR=%%\M\NO_APPL\TBL_A\JOB2\PROBID=123
JOB2 can then access this variable in a DO SHOUT statement without a full path name by specifying the variable with a backslash.
DO SHOUT TO TSO-U0014 URGENCY U
=*** Problem Encountered. Problem ID=%%\PROBID ***
Example
If a Global variable is assigned to JOB1 job as in the following statement:
DO SET VAR=%%\M\NO_APPL\TBL_A\JOB1\PROBID=123
and JOB2 accesses the variable, it would have to specify the appropriate path name (and pass any required security checks). For instance, JOB2 can access this variable in a DO SHOUT statement as follows:
DO SHOUT TO TSO-U0014 URGENCY U
=**Problem Occurred. ID=%%\M\NO_APPL\TBL_A\JOB1\PROBID**
Parent Topic |