Logo
Back

◆ New SORT Clause in Supervisor

Last updated: 3rd November 2008

The objects found by a Situation in an EV command can now be sorted before being passed to the Display or ODTSequence.

A <Sort Clause> is added to the command, where:

<Sort Clause>:
------- SORT ----+-----+--+------- <Display id> -----------+--!
                 !     !  !                                !
                 +- + -+  +-- ( -- <Inline Display> -- ) --+
                 +     +
                 +- - -+								
Examples:
EV ALLMX DISP (MIXNO,,TIME(PROCTIME)) SORT - (PROCTIME)
EV (PD:TRUE) DISP (SEGMENTS 8,,TITLE) [24] SORT (SEGMENTS) (*)= ON =:FL

SORT - means "sort descending", SORT + "sort ascending". If neither "+" or "-" is specified, it defaults to 'descending". By using the new OPAL function, COMPLEMENT, multiple keys can be sorted in different directions. The Display given in the <Sort Clause> returns a String, which is used as a key for the sort.

There is a slight difference in the way the Display is evaluated, compared with normal use. In a Sort, an <OPAL String> element has a fixed width. If none is specified, then for a String, it is assumed to be 64, and for an arithmetic or mnemonic, it is assumed to be 12. The Display may not contain a new line (/) delimiter or have a key length of more than 256 chars. Literal strings and the ",," delimiter are allowed, but are unlikely to be useful.

If an entry limit is specified, this is only applied after the Sort, so all of the objects will be passed to the Situation. However, to keep the overheads in control, an entry limit of 256 is imposed, even if greater value is specified.