HP 3000 Manuals

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


DBChange Plus User's Guide

ADD SET 

Adds a new master or detail data set to the database.

Syntax 

                                   {A KeyItem}
A[DD] SET DataSetName [( NextSet)] {M KeyItem}
                                   {D        }
[([ReadClassList]/[WriteClassList])] SetCapacity [( BlockFactor)]

[DeviceClass]

Parameters 

DataSetName               is the name of the data set to be added.  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.

(NextSet)                 is the data set that follows the newly added
                          data set in the schema.  If this parameter is
                          omitted, the new data set is placed last in the
                          SETS part of the schema.  Detail data sets must
                          be defined after any master data sets related
                          by a shared path.

A                         is used if you are adding an automatic master
                          data set.

M                         is used if you are adding a manual master data
                          set.

D                         is used if you are adding a detail data set.

KeyItem                   is the key item for a master data set.  This
                          parameter is required when adding a master data
                          set and cannot be used when adding a detail
                          data set.

(ReadClassList/           defines user class access to the data set.  If
WriteClassList)           this entire parameter is omitted (an absent
                          list), all user classes can read the data set.
                          (Data item security may allow update access to
                          individual fields within the data set if the
                          data item has read access to the data set and
                          is in the write class list of the data item.)
                          The class lists are defined below:

                          (ReadClassList)     is a list of user classes
                                              having read access to the
                                              new data set.  It can
                                              consist of user class
                                              numbers from 0 to 63,
                                              separated by commas.  If
                                              this parameter is empty
                                              [for example, (/12,14)],
                                              only users with write
                                              access can read the data
                                              set.  However, the database
                                              creator can read the data
                                              set.

                          (WriteClassList)    is a list of user classes
                                              that have write access to
                                              the new data set.  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 set.  However,
                                              the database creator can
                                              write to the data set.

SetCapacity               must be less than 231 -1 (2,147,483,647).

(BlockFactor)             is the new block factor for the data set.  If
                          this parameter is omitted, DBSCHEMA calculates
                          the optimal block factor for a block size of
                          512 words or for a block size specified by the
                          DBSchema $CONTROL command or by the CHANGE
                          BLOCKMAX command.

DeviceClass               is the disk on which the data set will reside.
                          If this parameter is omitted, DBSCHEMA defaults
                          to device class DISK.

Description 

Use this command to add a new data set to the database.  When adding
master data sets, the KeyItem parameter must be used.  Also remember that
all master data sets must appear in the schema before their related
detail data sets.  Use the REORDER SET command if it is necessary to
reorder data sets.

Use the ADD FIELD command on detail and manual master data sets and the
ADD PATH command on detail data sets to complete the definition of the
newly created data set.

Data Set Security 

When defining data set security, note that the absence of a
ReadClassList/WriteClassList (an absent list) allows all user classes to
read the data set, while the null (or empty) list (/), prevents everyone
except the database creator from accessing the data set.  Note that user
classes with read-only access to a data set may be allowed to update
fields (data items) within the data set if they are allowed write access
to the data item.

Example 

     >add set binnum-master (inventory) A binnum (14/11,18) 221 disk2 

In this example, a new automatic master data set, BINNUM-MASTER, is added
to the database.  It has a capacity of 221.  DISK2 is the device class
for the newly added data set.  User class 14 has read access to the data
set, and user classes 11 and 18 have write access (and implied read
access).  Because the NextSet parameter is used, the data set appears
directly before the INVENTORY data set in the schema.  The ADD PATH
command can now be used to define paths for the data set.

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

     SETS:
       NAME:     CUSTOMER    ,M(14/11,18);
       ENTRY:    ACCOUNT      (1)                      ,
                 LAST-NAME                             ,
                 FIRST-NAME                            ,
                 INITIAL                               ,
                 STREET-ADD                            ,
                 CITY                                  ,
                 STATE                                 ,
                 CREDIT-RATING                         ;
       CAPACITY: 221(10);

       NAME:     DATE-MASTER ,A(0,11,12,13,14,18/)
       ENTRY:    DATE          (3)
       CAPACITY: 211(9);

       NAME:     PRODUCT     ,M(13,14/12,18)
       ENTRY:    STOCK#       (2)
                 DESCRIPTION
       CAPACITY: 307(16)

       NAME:     SALES       ,D(11/14,18)
       ENTRY:    ACCOUNT      ( CUSTOMER (PURCH-DATE) )
                 STOCK#       (!PRODUCT               )
                 QUANTITY
                 PRICE
                 TAX
                 TOTAL
                 PURCH-DATE   ( DATE-MASTER           )
                 DELIV-DATE   ( DATE-MASTER           )
       CAPACITY: 504(14);

       NAME:     SUP-MASTER  ,M(13/12,18);
       ENTRY:    SUPPLIER     (1)                      ,
                 STREET-ADD                            ,
                 CITY                                  ,
                 STATE                                 ,
                 ZIP                                   ;
       CAPACITY: 211(12);                                <---- data set to be added 
                                                             before INVENTORY 

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

       END.

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

     SETS:
       NAME:     CUSTOMER    ,M(14/11,18);
       ENTRY:    ACCOUNT      (1)                      ,
                 LAST-NAME                             ,
                 FIRST-NAME                            ,
                 INITIAL                               ,
                 STREET-ADD                            ,
                 CITY                                  ,
                 STATE                                 ,
                 CREDIT-RATING                         ;
       CAPACITY: 221(10);

       NAME:     DATE-MASTER ,A(0,11,12,13,14,18/);
       ENTRY:    DATE          (2)                     ;
       CAPACITY: 211(19);

       NAME:     PRODUCT     ,M(13,14/12,18);
       ENTRY:    STOCK#       (1)                      ,
                 DESCRIPTION                           ;
       CAPACITY: 307(16);

       NAME:     SALES       ,D(11/14,18);
       ENTRY:    ACCOUNT      ( CUSTOMER (PURCH-DATE) ),
                 STOCK#       (!PRODUCT               ),
                 QUANTITY                              ,
                 PRICE                                 ,
                 TAX                                   ,
                 TOTAL                                 ,
                 PURCH-DATE   ( DATE-MASTER           ),
                 DELIV-DATE   ( DATE-MASTER           );
       CAPACITY: 504(14);

       NAME:     SUP-MASTER  ,M(13/12,18);
       ENTRY:    SUPPLIER                              ,
                 STREET-ADD                            ,
                 CITY                                  ,
                 STATE                                 ,
                 ZIP                                   ;
       CAPACITY: 211(12);

       NAME:     BINNUM-MASTER ,A(14/11,18);           <---- data set added 
       ENTRY:    BINNUM                                ;
       CAPACITY: 221(10);

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

     END.



MPE/iX 5.0 Documentation