You have seen that values for variables can come from several sources, for example, external members and SET VAR statements. Therefore, it is important to know the order in which these sources are checked, and the process involved in AutoEdit resolution in JCL.
Values for Local user-defined variables can be taken from any of several possible sources, as described below. When Control-M detects a Local user-defined variable in the JCL line being processed, it checks these possible sources in a specific order until a value is found for the variable. Control-M creates a user-defined variable environment in which it places each user-defined variable and its value.
The potential sources for Local user-defined variable values are listed below in the order in which they are generally checked:
These statements can be specified in JCL lines, including JCL comment lines. They assign values to variables.
These statements can be specified in the job scheduling definition. They can be used to define new variables, or to assign new values to existing variables.
SET VAR statements can affect all job submissions.
DO SET statements can override values specified by a SET VAR or previous DO SET statement. However, since DO SET statements are Postprocessing parameters, they only affect subsequent runs of a job, specifically, rerun and restarted jobs.
These members define local variables and specify their values. Members are searched in the order they appear in the JCL.
These members define local variables and specify their values. Members are searched in the order they appear in the JCL.
The order in which Control-M checks potential sources for possible AutoEdit variable resolution is important because once Control-M has resolved a variable, it generally stops checking other sources. Potential values from other sources are ignored, and resolved values are not overridden except by %%SET statements in subsequent JCL lines.
Because JCL is processed sequentially one line at a time, the line being processed can only be affected by external members and %%SET control statements that have previously been processed. If a line contains an undefined variable that is only defined in a subsequent line, the variable cannot be resolved.
By default, if Control-M cannot resolve a variable, it stops submission of the job. This default, however, can be overridden by specifying the %%RESOLVE control statement with a value of NO or OFF.
This completes the steps in this chapter of the Control-M for z/OS Getting Started Guide.
Parent Topic |