Previous Topic

Next Topic

Book Contents

Book Index

%%$RANGE

A %%$RANGE statement limits performance of AutoEdit functions to a specified column range. Data, commands and control statements outside the range remain unchanged.

This statement is useful when values must be specified in specific columns and when not every AutoEdit expression needs to be resolved.

The format of the %%$RANGE statement is:

%%$RANGE fromcol tocol

In this format

Any range from 1 through 255 can be specified. If no range is specified, the default range is from 1 through 255.

The specified range limit applies both to the columns read for resolution and to the columns containing the resolved values, as follows:

Input for AutoEdit resolution is taken from the specified column range. All columns in the range are processed, whether they contain AutoEdit terms or constants.

Resolved values are limited to the specified range. If the resolved value would normally exceed the range, it is truncated.

The %%$RANGE statement can prevent the shifting of constants and variables that appear subsequent to an AutoEdit variable in the same line. By limiting AutoEdit resolution to a specified range, all constants and variables outside the specified range remain in their original positions regardless of the length of the resolved variables.

A %%$RANGE statement is valid until a new %%$RANGE statement is specified.

Note: The length of a %%$RANGE statement with 3-digit fromcol and tocol values is 14 characters. BMC recommends that you allow room for 14 characters even if the present %%$RANGE statement does not include 3-digit numbers. If a %%$RANGE statement containing fewer than 14 characters is specified, the user will not be able to use a subsequent %%$RANGE statement to expand the range back to the maximum length.

Example

In the example shown below, the %%$RANGE statement limits resolution to the columns from 1 through 44. If the %%MYVAR variable resolves to more than 44 spaces, only the first 44 characters are displayed.

DO SET      = %%$RANGE 1 44                                                GLOBAL

DO SHOUT    = TO OPER                    URGENCY  RCTO282I

     MESSAGE %%$MYVAR                                             WAS DELETED

Parent Topic

Control Statements