HP 3000 Manuals

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


DBChange Plus User's Guide

Deleting a Field from a Data Set 

To delete a field from a manual master or detail data set, use the DELETE
FIELD command.  In this section, the field CREDIT-RATING is deleted from
the master data set CUSTOMER in the ORDERS database.  Before deleting the
field, the REVIEW FIELDS output looks like this:

       Data Set No.:  3   Name:  CUSTOMER   Type:  M

       Fld No.  Field Name        Detail Set Name   Path's Search Item
       ---------------------------------------------------------------

       1        ACCOUNT           SALES             ACCOUNT
       2        LAST-NAME
       3        FIRST-NAME
       4        INITIAL
       5        STREET-ADD
       6        CITY
       7        STATE
       8        ZIP
       9        CREDIT-RATING                <---- field to be deleted 

In the example below, the field CREDIT-RATING is deleted from the data
set CUSTOMER. In an interactive session, a message is displayed asking
you to confirm the deletion of the field.  In batch mode, the data set is
deleted without confirmation.  If you attempt to delete a field that is
also a search item, you must first delete the path.  If you attempt to
delete a field that is a sort item in any data set, you must first delete
the sort item.  Refer to chapter 6, "Changing Paths in a Detail Data
Set," for more information.  The DBCPLUS program displays a message
confirming that the field is deleted.

     >delete field customer credit-rating 
      Deletion of field accepted.

     >

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


CAUTION Once you have deleted a field, it cannot be recovered from the change file; you must use the ADD FIELD command to add it back in to the data set. However, if the field contained data before it was deleted, the data cannot be recovered.
If you want to verify the deletion of the field, use the REVIEW FIELDS command. In the following example, you can see that the field CREDIT-RATING no longer appears in the data set CUSTOMER field list: >review fields customer REVIEW FIELDS (MASTER SET): Data Set No.: 3 Name: CUSTOMER Type: M Fld No. Field Name Detail Set Name Path's Search Item --------------------------------------------------------------- 1 ACCOUNT SALES ACCOUNT 2 LAST-NAME 3 FIRST-NAME 4 INITIAL 5 STREET-ADD 6 CITY 7 STATE 8 ZIP <---- field deleted


MPE/iX 5.0 Documentation