HP 3000 Manuals

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


DBChange Plus User's Guide

ADD ITEM 

Adds a data item to the database.

Syntax 

     A[DD] ITEM ItemName [( NextItem)] [ SubitemCount] SubitemType SubitemLength 
     [([ ReadClassList]/[ WriteClassList])]

Parameters 

ItemName                  is the name of the data item to be added.  Each
                          data item within the database must have a
                          unique name.  This name must be from 1 to 16
                          characters, the first of which must be
                          alphabetic.  Characters after the first must be
                          chosen from this set:  letters A - Z, digits 0
                          - 9, and + * / ?  '  # % & @ only.

(NextItem)                is the existing data item that follows the
                          newly added data item in the schema.  If this
                          parameter is omitted, the new data item is
                          placed last in the ITEM part of the schema.

SubitemCount              must be an integer from 1 to 255.  For data
                          item types U, X, or Z, the product of the
                          subitem count and the subitem length must equal
                          an even number.  For data item type P, the
                          product of the subitem count and the subitem
                          length must be evenly divisible by 4.  If this
                          parameter is omitted, the subitem count is
                          assumed to be 1.

SubitemType               must be a valid data item type:  I, J, K, R, U,
                          X, Z, or P.

SubitemLength             has a maximum of 255 for data item types U, X,
                          Z, and P. The length for types I or J must be
                          1, 2, or 4.  For type K it must be 1 or 2, and
                          for type R it must be 2 or 4.  For data item
                          types U, X, or Z, the product of the subitem
                          count and the subitem length must equal an even
                          number.  For data item type P, the product of
                          the subitem count and the subitem length must
                          be evenly divisible by 4.

(ReadClassList/           defines user class access to the data item.  If
WriteClassList)           this entire parameter is omitted (an absent
                          list), all user classes can read the data item
                          unless access is further restricted by data set
                          security.  Note that access to a data item is
                          only possible when the data item is a field in
                          a data entry.  The two class lists are defined
                          as follows:

                          (ReadClassList)     is a list of the user
                                              classes that have read-only
                                              access to the added item.
                                              It can consist of user
                                              class numbers from 0 to 63,
                                              separated by commas.  If
                                              this parameter is empty
                                              [for example, (/12,14)], no
                                              user classes have read
                                              access to the data item
                                              unless access is allowed by
                                              data set security.
                                              However, the database
                                              creator can read the data
                                              item.

                          (WriteClassList)    is a list of the user
                                              classes that have write
                                              (and implied read) access
                                              to the data item.  It can
                                              consist of user class
                                              numbers from 0 to 63,
                                              separated by commas.  If
                                              this parameter is empty
                                              [for example, (12,14/)], no
                                              user class has write access
                                              to the data item unless
                                              access is allowed by data
                                              set security.  However, the
                                              database creator can write
                                              to the data item.

Description 

Use this command to add a new data item to the database.

When defining data item security, note that the absence of a
ReadClassList/WriteClassList (an absent list), allows all user classes to
read the data item unless prevented by data set security, while the null
(or empty) list (/), prevents all user classes from accessing the data
item unless allowed by data set security.  Note also that data set
security can further restrict or enhance user class access to data items.

Example 

     >add item store# j 2 (11,12/14) 

In this example, a new data item STORE# is added to the database.  The
data item is of type J and has a subitem length of 2.  User classes 11
and 12 have read access and user class 14 has write access to the new
data item.  Because NextItem and SubitemCount parameters are not
specified, the new data item appears at the end of the ITEMS part of the
schema and has a subitem count of 1.

Before the addition, the ITEMS part of the schema looks like this:

     ITEMS:
       ACCOUNT         , J2(0,11,12,13,14,18/);
       BINNUM          , Z2(/13);
     :
       TOTAL           , J2(11,14);
       UNIT-COST       , P8(/12);
       ZIP             , X6(12,13,14/11);    <---- item to be added after ZIP 

After the addition, the ITEMS part of the schema looks like this:

     ITEMS:
       ACCOUNT         , J2(0,11,12,13,14,18/);
       BINNUM          , Z2(/13);
     :
       TOTAL           , J2(11,14);
       UNIT-COST       , P8(/12);
       ZIP             , X6(12,13,14/11);
       STORE#          , J2(11,12/14);     <---- new item added 



MPE/iX 5.0 Documentation