Indices

<< Click to Display Table of Contents >>

Navigation:  Reference > Pre-processor >

Indices

The Pre-processor maintains a library of variables, and you may set, modify, test and substitute into your file the value of these variables. To avoid confusion with CL variables, the PP variables are called indices; an individual PP variable is an index.

You may use up to 10000 indices.

Each index has a name of up to 30 characters that must be either letters (a-z) or numbers (0-9). The first character must be a letter (a-z). Case is ignored when comparing names so Top2Index is the same as TOP2INDEX.

We recommend using index names consisting of whole words put together with the first letter of each word in upper case, for example ProductFirst or Product1Test2.

Index values

The indices are all preset to a special "null" value. You can assign a value to an index in a number of ways: by the use of a *SET, *DO or *FOR command or by the PP Run Control Parameter. The value of an index must always be within the inclusive range:

-1000000000 to +1000000000.

In the syntax in this chapter, an index will be denoted by the letter x.

Two special types of index are used in *DBOPEN and *DBLOOP commands. Index names set in these commands are reserved for this purpose and cannot be used as ordinary indices elsewhere in the CL script. For this reason we recommend using DB as the first two characters of the index name in these commands.