HP 3000 Manuals

Adding Data Items [ DBChange Plus Technical Addendum for MPE/iX Release 4.0 ] MPE/iX 5.0 Documentation


DBChange Plus Technical Addendum for MPE/iX Release 4.0

Adding Data Items 

In this section, several data items of various data types are added to
the ORDERS database.  TAX-RATE is used to illustrate adding a data item
of type E. CREDIT-LIMIT is added as a type I and is converted to a type E
in a later section.  SCRAP-FACTOR and YIELD are both added as items of
type R; when these are later converted to type E, one is assumed to
contain data already in IEEE format while the other contains data in HP
3000 real format.

Use the ADD ITEM command to add the new data items TAX-RATE,
CREDIT-LIMIT, SCRAP FACTOR, and YIELD to the ORDERS database.  Before
adding the data items, use the REVIEW ITEMS command to see a listing of
the current items, as follows:

       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 items TAX-RATE, CREDIT-LIMIT,
SCRAP-FACTOR, and YIELD are added using the ADD ITEM command.  They
should appear in the data item list before the data items identified
inside parentheses on each command line below.  The sub-count for all of
these data items is assumed to be 1 by default.  For TAX-RATE, the type
is E, the length 2; and user class 14 has read access to it.  For
CREDIT-LIMIT, the type is I, the length 2; and user class 14 has write
access to it.  For SCRAP-FACTOR, the type is R, the length is 4; and user
class 12 has write access to it.  For YIELD, the type is R, the length is
2; item security is not added at this time for illustrative purposes here
and in a later section.  The DBCPLUS program displays a message
confirming that each new data item is accepted.

     >add item tax-rate (total) e 2 (14/) 
      Addition of data item accepted.

     >add item credit-limit (credit-rating) i 2 (/14) 
      Addition of data item accepted.

     >add item scrap-factor (state) r 4 (/12) 
      Addition of data item accepted.

     >add item yield (zip) r 2  
      Addition of data item accepted.

     >

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

If you want to verify that the new data items TAX-RATE, CREDIT-LIMIT,
SCRAP-FACTOR, and YIELD have been added to the change file, use the
REVIEW ITEMS command.  You can see that the data items have 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-LIMIT      I2      (/14)       <== data item added 
       5       CREDIT-RATING     R2      (/14)
       6       DATE              X6      (11,12,13,14,18/)
       7       DELIV-DATE        X6      (/14)
       8       DESCRIPTION       X20     (11,12,13,14,18/)
       9       FIRST-NAME        X10     (14/11)
       10      INITIAL           U2      (14/11)
       11      LAST-NAME         X16     (14/11)
       12      LASTSHIPDATE      X6      (12/)
       13      ONHANDQTY         J2      (14/12)
       14      PRICE             J2      (14/)
       15      PURCH-DATE        X6      (11/14)
       16      QUANTITY          I1      (/14)
       17      SCRAP-FACTOR      R4      (/12)       <== data item added 
       18      STATE             X2      (12,13,14/11)
       19      STOCK#            U8      (11,12,14,18/)
       20      STREET-ADD        X26     (12,13,14/11)
       21      SUPPLIER          X16     (12,13/)
       22      STORE#            8J2     (11,12/14)
       23      TAX               J2      (14/)
       24      TAX-RATE          E2      (14/)       <== data item added 
       25      TOTAL             J2      (11,14/)
       26      UNIT-COST         P8      (/12)
       27      YIELD             R2                  <== data item added 
       25      ZIP               X6      (12,13,14/11)



MPE/iX 5.0 Documentation