ORDER primary command

In the FM/Db2 editor, the ORDER command sets the display order for one or more columns in the TABL and SNGL display format.

Held columns are ordered in relation to other held columns. Unheld columns are ordered in relation to other unheld columns.

You can also specify a display order by typing a number in the SEQ column using the template editor.

Syntax


1 ORDER
1 
2.1 fieldref
2.1 fldname
2.1 seq
1 RESET
fieldref
A single field reference (for example, #1), a range (for example, #2-#5), or a list of single field references/ranges separated by spaces (for example, #1 #4 #6-#7). A single field specification is #n; n is a positive integer and cannot exceed the number of columns in the Db2® object or result table being processed.
fldname
The name of a column in the Db2® object or result table being processed. The column name can be preceded by a pound sign (#). Any value entered is translated to upper case if the "Translate Db2® object names" system's option is selected.
seq
A positive integer that indicates the relative order for the column among other ordered columns.

Examples

ORDER #9 #2
Displays columns #9 and #2 on the left.
ORDER #4 0
Removes #4 from the list of ordered columns.
ORDER #6 2
Displays column #6 as the second ordered column.
ORDER #5-#7 0
Removes columns #5 - #7 from the list of ordered columns.

Availability

Related tasks