A %%RANGE statement limits the handling of AutoEdit functions and variables to a specified column range. The contents of all columns outside the range remain unchanged.
This statement is useful when values must be specified in specific columns and when not every AutoEdit statement need be resolved.
The format of the statement is:
%%RANGE fromcol tocol
where:
Note: once a %%RANGE statement is specified in a member, it then applies to all following JCL and data statements unless explicitly changed by a new %%RANGE statement.
Note: When used in a Control-M SETVAR job definition, the format of the %%RANGE statement should be: %%RANGE=fromcol,tocol
The %%RANGE statement can prevent the shifting of constants and variables that appear after an AutoEdit variable in the same line. By limiting AutoEdit resolution to a specified range, all constants and variables outside the specified range are kept in their original positions regardless of the length of the resolved variables.
Each %%RANGE statement is valid until a new %%RANGE statement is specified. Note, however, that the placement of the subsequent %%RANGE statement must be within the column range of the preceding %%RANGE statement (or it is not recognized as an AutoEdit statement).
Note: The minimum length of a %%RANGE statement with 2-digit fromcol and tocol values is 12 characters. Do not, therefore, specify a range of fewer than 12 columns, or you cannot use a subsequent %%RANGE statement to expand the range back to the regular line length.
Example
This example shows how a %%RANGE statement affects the resolution of a line. In the original JCL, the %%RANGE statement affects the second occurrence of the AutoEdit variable, but not the first. In the submitted JCL, note the impact on the positioning of constant CONSTANT.
The original JCL:
|
|
|
|
The submitted JCL:
|
|
|
|
Parent Topic |