Adding a Path to a Detail Data Set [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
Adding a Path to a Detail Data Set
To add a path linking a detail data set to a master data set, use the ADD
PATH command. In this section, a new path is added to the SALES detail
data set of the ORDERS database. Before adding a path, the REVIEW PATHS
command ouput looks like this:
DATA SET NO: 4 NAME: SALES TYPE: D
SEARCH ITEM NAME MASTER SET NAME SORT ITEM NAME PRIMARY
================ ================ ================ =======
ACCOUNT CUSTOMER PURCH-DATE Y
STOCK# PRODUCT
PURCH-DATE DATE-MASTER
DELIV-DATE DATE-MASTER
>
NOTE When adding a path, remember that the master data set must appear
before the detail data set in the data set list in the schema. To
do this, use the REORDER SET command. Refer to chapter 10,
"DBChange Plus Commands," for information about the REORDER SET
command.
In the example below, SALES is the name of the detail data set that will
contain the new search item. FILL-DATE is the name of the search item
for the new path. The exclamation point (!) indicates that the new path
is to be the primary path. DATE-MASTER is the name of the master data
set containing the key item to be related to the search item. STOCK# is
the name of the sort item for the new path. DBChange returns a message
confirming the addition of the new path.
>add path sales fill-date !date-master stock#
Addition of path accepted.
>
Refer to "ADD PATH" 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 path, use the REVIEW PATHS
command. In the following example, you can see that FILL-DATE is now the
search item for the new primary path to the data set DATE-MASTER:
>review paths sales
DATABASE NAME: ORDERS
REVIEW PATHS (FOR DETAIL DATA SET):
DATA SET NO: 4 NAME: SALES TYPE: D
SEARCH ITEM NAME MASTER SET NAME SORT ITEM NAME PRIMARY
================ ================ ================ =======
ACCOUNT CUSTOMER PURCH-DATE
STOCK# PRODUCT
PURCH-DATE DATE-MASTER
DELIV-DATE DATE-MASTER
FILL-DATE DATE-MASTER STOCK# Y <---- *
* FILL-DATE is now the search item for the primary path to the
DATE-MASTER data set. STOCK# is the sort item.
MPE/iX 5.0 Documentation