Adding a Sort Item to a Detail Data Set [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
Adding a Sort Item to a Detail Data Set
To add a sort item to a search item in a detail data set, use the ADD
SORT command. The sort item must already be a field in the data set. In
this section, a new sort item is added to the INVENTORY detail data set
of the ORDERS database. Before adding a sort item, the REVIEW PATHS
command output looks like this:
DATA SET NO: 6 NAME: INVENTORY TYPE: D
SEARCH ITEM NAME MASTER SET NAME SORT ITEM NAME PRIMARY
================ ================ ================ =======
STOCK# PRODUCT
SUPPLIER SUP-MASTER Y
LASTSHIPDATE DATE-MASTER
>
In the example below, INVENTORY is the name of the detail data set that
will contain the sort item. SUPPLIER is the name of the search item
whose like values will be sorted based on the new sort item values.
LASTSHIPDATE is the name of the new sort item. The DBCPLUS program
displays a message confirming the addition of the new sort item.
>add sort inventory supplier lastshipdate
New sort item added.
>
Refer to "ADD SORT" in chapter 10, "DBChange Plus Commands," for a
detailed description of the command syntax and parameters.
If you want to verify the addition of the sort item, use the REVIEW PATHS
command. In the following example, you can see that LASTSHIPDATE is now
the sort item for the search item SUPPLIER:
>review paths inventory
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 6 NAME: INVENTORY TYPE: D
SEARCH ITEM NAME MASTER SET NAME SORT ITEM NAME PRIMARY
================ ================ ================ =======
STOCK# PRODUCT
SUPPLIER SUP-MASTER LASTSHIPDATE Y <---- *
LASTSHIPDATE DATE-MASTER
*LASTSHIPDATE is now the sort item for the search item SUPPLIER.
>
MPE/iX 5.0 Documentation