The scope of a variable is the extent to which it is available to other jobs. Each variable can be
local for a specific job
common to all jobs in a SMART Table
global for all jobs
Multiple Capture statements in a job definition can specify the same variable name. In such a case, the last processed capture determines the value placed into the variable.
Control M uses the following logic to determine which value to use when a variable is specified in a job processing definition:
Control M checks if a local variable (for the job) has been defined with the specified name. If a local variable exists, the value specified for that variable is used.
If no local variable exists with the specified name, and the job is in a SMART Table, Control M checks for a variable with the specified name in the SMART Table definition. If the variable is defined in the SMART Table definition, that value is used.
If a SMART Table variable is specified, but the job is not in a SMART Table, or the variable is not defined in the SMART Table definition, an error is produced.