HP 3000 Manuals

Adding a Field to a Data Set [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

Adding a Field to a Data Set 

To add a field to a manual master or detail data set, use the ADD FIELD
command.  In this section, the field STORE# is added to the INVENTORY
data set in the ORDERS database.  Before adding the field, the REVIEW
FIELDS output like this:

       Data Set No.:  6   Name:  INVENTORY   Type:  D

       Fld No. Field Name       Pr Sr So  Master Set Name  Sort Item Name
       --------------------------------------------------------------------

       1       STOCK#              Y      PRODUCT
       2       ONHANDQTY
       3       SUPPLIER         Y  Y      SUP-MASTER <---- field to be added here 
       4       UNIT-COST
       5       LASTSHIPDATE        Y      DATE-MASTER
       6       BINNUM              Y      BINNUM-MASTER

In the example below, the field STORE# is added to the INVENTORY data
set.  It should appear before the field SUPPLIER in the field list of the
data set.  When adding a field to a data set, the new field must already
exist as a data item in either the current change file or in the
database.  The DBCPLUS program displays a message confirming the addition
of the new field.

     >add field inventory store# supplier 
      Addition of field accepted.

     >

Refer to "ADD FIELD" in chapter 10, "DBChange Plus Commands," for a
detailed description of the command syntax.

To add a search item to a detail data set, use the ADD PATH command,
which is discussed in chapter 6, "Changing Paths in a Detail Data Set,"
and chapter 10, "DBChange Plus Commands."

If you want to verify the addition of the new field, use the REVIEW
FIELDS command.  In the following example, you can see that the field
STORE# is added to the data set INVENTORY:

     >review fields inventory 

     REVIEW FIELDS (DETAIL SET):

       Data Set No.:  6   Name:  INVENTORY   Type:  D

       Fld No. Field Name       Pr Sr So  Master Set Name  Sort Item Name
       --------------------------------------------------------------------

       1       STOCK#              Y      PRODUCT
       2       ONHANDQTY
       3       STORE#                                       <---- field added 
       4       SUPPLIER         Y  Y      SUP-MASTER
       5       UNIT-COST
       6       LASTSHIPDATE        Y      DATE-MASTER
       7       BINNUM              Y      BINNUM-MASTER



MPE/iX 5.0 Documentation