HP 3000 Manuals

ADD FIELD [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

ADD FIELD 

Adds a field (data item) to a manual master or detail data set.

Syntax 

     A[DD] F[IELD] DataSetName FieldName [( NextField)]

Parameters 

DataSetName         is the name of the manual master or detail data set
                    to which the field will be added.

FieldName           is the name of the field to be added.  It must
                    already exist as a data item in either the change
                    file or the database.

(NextField)         is the existing field that will follow the newly
                    added field in the schema.  If this parameter is
                    omitted, the new field becomes the last field in the
                    data set.

Description 

Use this command to add a field (data item) to a manual master or detail
data set.  The field must already exist as a data item in either the
change file or the database.  Use the optional NextField parameter to
place the field in a specified order in the data set.  Otherwise, the
newly added field is placed last.  Note that the occurrence of a data
item in a data set is referred to as a field to distinguish it from the
definition of the data item itself.

Use the ADD ITEM command to add a new data item to the database.

Example 

     >add field inventory store# (supplier) 

In this example, the field STORE# is added to the INVENTORY detail data
set.  The existing field, SUPPLIER, will appear directly after the newly
added field, STORE#, in the schema listing for the data set.

Before the addition, the schema entry for the INVENTORY detail data set
looks like this:

     NAME:     INVENTORY       ,D(12,14/13,18);
     ENTRY:    STOCK#           (PRODUCT     ),
               ONHANDQTY                      ,
               SUPPLIER         (!SUPMASTER  ), <---- field to be added above 
               UNIT-COST                      ,
               SUPPLIER                              
               LASTSHIPDATE     ( DATE-MASTER),      
               BINNUM                         ;
     CAPACITY: 450(15);

After the addition, the schema entry for the INVENTORY detail data set
looks like this:

     NAME:     INVENTORY       ,D(12,14/13,18);
     ENTRY:    STOCK#           (PRODUCT     ),
               ONHANDQTY                      ,
               STORE#                         ,  <---- new field added 
               SUPPLIER         (!SUPMASTER  ),
               UNIT-COST                      ,
               LASTSHIPDATE     ( DATE-MASTER),
               BINNUM                         ;
     CAPACITY: 450(15);



MPE/iX 5.0 Documentation