HP 3000 Manuals

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


DBChange Plus User's Guide

Adding a Data Item 

To add a data item to the database, use the ADD ITEM command.  In this
section, the new data item STORE# is added to the ORDERS database.
Before adding the data item, the REVIEW ITEMS output looks like this:

       Itm No. Item Name         Attrib  Security
       ------------------------------------------

       1       ACCOUNT           I4      (11,12,13,14,18/)
       2       BINNUM            Z2      (/13)
       3       CITY              X12     (12,13,14/11)
       4       CREDIT-RATING     R2      (/14)
       5       DATE              X6      (11,12,13,14,18/)
       6       DELIV-DATE        X6      (/14)
       7       DESCRIPTION       X20     (11,12,13,14,18/)
       8       FIRST-NAME        X10     (14/11)
       9       INITIAL           U2      (14/11)
       10      LAST-NAME         X16     (14/11)
       11      LASTSHIPDATE      X6      (12/)
       12      ONHANDQTY         J2      (14/12)
       13      PRICE             J2      (14/)
       14      PURCH-DATE        X6      (11/14)
       15      QUANTITY          I1      (/14)
       16      STATE             X2      (12,13,14/11)
       17      STOCK#            U8      (11,12,14,18/)
       18      STREET-ADD        X26     (12,13,14/11)
       19      SUPPLIER          X16     (12,13/)
       20      TAX               J2      (14/)
       21      TOTAL             J2      (11,14/)
       22      UNIT-COST         P8      (/12)
       23      ZIP               X6      (12,13,14/11)

In the example below, the data item STORE# is added using the ADD ITEM
command.  It should appear before the data item TAX in the data item
list.  The sub-count is 8, the type is J, and the length is 2.  User
classes 11 and 12 have read access, and user class 14 has write access to
the new data item.  The DBCPLUS program displays a message confirming
that the new data item is accepted.

     >add item store# (tax) 8 j 2 (11,12/14) 
      Addition of data item accepted.

     >

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

If you want to verify that the new data item STORE# has been added to the
change file, use the REVIEW ITEMS command.  In the following example, the
@ parameter is used to display all the data items in the ORDERS database.
You can see that the data item STORE# has been added.

     >review items @  

     REVIEW ITEMS:

       Itm No. Item Name         Attrib  Security
       ------------------------------------------

       1       ACCOUNT           I4      (11,12,13,14,18/)
       2       BINNUM            Z2      (/13)
       3       CITY              X12     (12,13,14/11)
       4       CREDIT-RATING     R2      (/14)
       5       DATE              X6      (11,12,13,14,18/)
       6       DELIV-DATE        X6      (/14)
       7       DESCRIPTION       X20     (11,12,13,14,18/)
       8       FIRST-NAME        X10     (14/11)
       9       INITIAL           U2      (14/11)
       10      LAST-NAME         X16     (14/11)
       11      LASTSHIPDATE      X6      (12/)
       12      ONHANDQTY         J2      (14/12)
       13      PRICE             J2      (14/)
       14      PURCH-DATE        X6      (11/14)
       15      QUANTITY          I1      (/14)
       16      STATE             X2      (12,13,14/11)
       17      STOCK#            U8      (11,12,14,18/)
       18      STREET-ADD        X26     (12,13,14/11)
       19      SUPPLIER          X16     (12,13/)
       20      STORE#            8J2     (11,12/14)       <---- data item added 
       21      TAX               J2      (14/)
       22      TOTAL             J2      (11,14/)
       23      UNIT-COST         P8      (/12)
       24      ZIP               X6      (12,13,14/11)



MPE/iX 5.0 Documentation