ORDER statement
The ORDER statement indicates the sequence in which control sections or named common areas appear in the output program object or load module. The control sections or named common areas appear in the sequence they are specified on the ORDER statement. If this is a section with multiple text classes, all elements in the section are ordered. Optionally, (P) may be specified to indicate page alignment, whcih applies to all elements in the section (with the exception of those elements in merge classes).
The syntax of the ORDER statement is:
ORDER section name[(P)][,...]
- section name
- The name of the section to be sequenced.
- (P)
- Indicates the starting address of the control section or named common area is on a page boundary within the program object or load module. The control sections or common areas are aligned on 4KB page boundaries, unless the ALIGN2 option has been specified (in which case alignment is on 2KB page boundaries). If this is a section with multiple text classes, all elements in the section (with the exception of those elements in merge classes) are aligned on a page boundary.
Placement: An ORDER statement can usually
be placed before, between, or after object modules or other control
statements.
Note:
- When multiple ORDER statements are used, their sequence further determines the sequence of the control sections or named common areas in the output module. If the same common area or control section is listed on more than one ORDER statement, the binder uses the sequence stated on the last request.
- The control sections and common areas named as operands can appear in either the primary input or the automatic call library, or both.
- If a control section or a named common area is changed by a CHANGE or REPLACE control statement and sequencing is desired, specify the new name on the ORDER statement.