ADD SORT [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
ADD SORT
Adds a new sort item to a search item of a path.
Syntax
A[DD] SO[RT] DetailDataSetName SearchItemName SortItemName
Parameters
DetailDataSetName is the name of the detail data set for the new sort
item.
SearchItemName is the name of the search item whose chains are
sorted based on the new sort item values.
SortItemName is the name of the new sort item. It must be an
existing field in the data set.
Description
Use this command to add a new sort, or to replace an existing sort item,
to a search item of a path. All parameters are required. If a sort item
already exists for the path, the new sort item replaces it. The sort
item must be a data item other than the current search item for that
path. Only data items types U, K, or X can be sort items.
Example
>add sort sales account purch-date
In this example, the sort item PURCH-DATE is added to the path defined by
the search item ACCOUNT in the detail data set SALES.
Before the addition, the SALES data set entry in the schema looks like
this:
NAME: SALES ,D(11/14,18);
ENTRY: ACCOUNT ( CUSTOMER ), <---- sort item to be added
STOCK# (!PRODUCT ),
QUANTITY ,
PRICE ,
TAX ,
TOTAL ,
PURCH-DATE ( DATE-MASTER ),
DELIV-DATE ( DATE-MASTER );
CAPACITY: 504(14);
After the addition, the SALES data set entry in the schema looks like
this:
NAME: SALES ,D(11/14,18);
ENTRY: ACCOUNT ( CUSTOMER (PURCH-DATE)), <---- sort item added
STOCK# (!PRODUCT ),
QUANTITY ,
PRICE ,
TAX ,
TOTAL ,
PURCH-DATE ( DATE-MASTER ),
DELIV-DATE ( DATE-MASTER );
CAPACITY: 504(14);
MPE/iX 5.0 Documentation