Skip to main content

ORDERED

[attributename := ] ORDERED( actionlist )

attributenameOptional. The action name, which turns the action into an attribute definition, therefore not executed until the attributename is used as an action.
actionlistA comma-delimited list of the actions to execute in order. These may be ECL actions or external actions.

The ORDERED action executes the items in the actionlist in the order in which they appear in the actionlist. This is useful when a subsequent action requires the output of a precedent action.

It has the ordering requirements of SEQUENTIAL. This is most useful for ordering actions which do not have anything in common, for example, generating files and then sending email. If there is any chance of a shared value which may change meaning, you should use SEQUENTIAL.

By definition, PERSIST on an attribute means the attribute is evaluated outside of any given evaluation order. Therefore, ORDERED has no effect on PERSISTed attributes.

Example:

Act1 :=
        OUTPUT(A_People,OutputFormat1,'//hold01/fred.out');
Act2 :=
        OUTPUT(Person,{Person.per_first_name,Person.per_last_name})
Act2 := OUTPUT(Person,{Person.per_last_name})));
//by naming these actions, they become inactive
        attributes
//that only execute when the attribute names are called as
        actions
ORDERED(Act1,PARALLEL(Act2,Act3));
//executes Act1 alone, and then executes Act2 and Act3 together

See Also: PARALLEL, PERSIST, SEQUENTIAL