Job variables are a component of the chargeable software product JV (Job Variables). Only if JV is loaded is it possible to access the job variables. (The Job Variables system and the job variables themselves are described fully in the “Job Variables” manual [5]).
Job variables are utilized in both non-S and S procedures.
The use of job variables is the same in both S and non-S procedures; that is, to synchronize batch jobs, i.e. procedures which are started in the background
The links between variables and job variables are defined in the variable declarations (CONTAINER operand). The S variables must be of data type STRING, and must not be longer than 256 bytes.
Job variables which have not yet been explicitly initialized contain the value 256 X’EE’, so that they can be distinguished from empty strings (strings of length 0).
Job variables are managed like files, by means of a catalog entry. Like files, they can also be protected by a password. To allow such password protected job variables to be accessed, for example when a job variable is defined as a variable container, the password must be entered in the password table for the job by means of the command ADD-PASSWORD. Only then is it possible to call the SDF-P command which accesses the job variable.
Job variables also play an important role in expression replacement. This is described in detail in section “Expression replacement”.
The table on the next page gives a comparison between S variables and job variables.
Note
It is possible to query whether S variables have been initialized using a predefined function: IS-INITIALIZED( )
Attribute | S variable | Job variable (JV) | |
Name | |||
SDF data type | <composed-name> | <filename> | |
Length | 1..255 | 1..54 | |
Character set | A...Z, 0...9, #, @, -, . | A...Z, 0...9, $,#, @, -, . | |
Permissible data types | STRING | STRING | |
Maximum size (= field length) | 4096 bytes (STRING) | 256 bytes | |
Variable formats | Simple variable | User JV | |
Scope | Task | Task (temporary JV); | |
Declaration | Implicitly from assignment | Explicitly by command | |
Initialization | As part of declaration | - | |
Value assignment | As part of declaration | Explicitly by assignment | |
Deletion | Automatic at procedure or task end | Automatic at task end |