ORDER

<< Click to Display Table of Contents >>

Navigation:  Reference > Commands >

ORDER

The form of the ORDER command is:

ORDER codes,

All the codes VX0123456789 must be present in the command, in any order, and no code may appear twice.

The ORDER command may appear only once, in the Data Stage, immediately after the START DATA command. It is non-executable and serves to inform the program in what order the code positions on the input data lines are to be processed. If no ORDER command appears, the order assumed is VX0123456789. Analysis requirements often assume a different order, for example the order 1234567890XV.

The Companion usually only uses codes 1-9,0. Scripts generated by the menu system use order 1234567890VX although V and X are not used.

The order in which code positions are processed affects the type of constructions you may put in your code. There are two instances of this.

Firstly, in range tests of the form col/code..code, the second code must always be further down the ORDER list than the first. Thus if the implied order is 1234567890XV, then $112/9..V would be allowed but $112/X..4 would not.

Secondly, in short forms in string definitions of the form col/code-code, again the second code must be further down in the ORDER list than the first. So if the ORDER is 0123456789XV, then $217/7-X would be allowed, but $217/X-4 would not.

Another short form allowed in string definitions is col on its own. In this case, the codes are picked up in the order specified on the ORDER command.

IMPORTANT: there are exceptions to the above rules:

When a col is being defined as in:

d $237=$mcol,

the order is always VX0123456789.

There is one definition which breaks this rule:

d $237=$167,

will cause a straight transfer of one data location to the other. To illustrate the distinction, let us suppose that ORDER is set to 1234567890XV, and the following commands appear:

d $mcol=$167,

d $237=$mcol,

Unless the order is VX0123456789, this will cause data location 237 to be a reshuffled version of data location 167. This is because the first line uses the ORDER command and the second line does not.

In logical definitions, a col will always be treated as VX0123456789.

In expansion definitions, codes will always be picked up as VX0123456789.

Examples of ORDER command:

order vx0123456789,

order 1234567890xv,