HP 3000 Manuals

DICTDBC [ DICTIONARY 3000 ] MPE/iX 5.0 Documentation


DICTIONARY 3000

DICTDBC 

Database Creation Utility 

The Database Creation utility (DICTDBC) creates a schema and a root file
for an IMAGE database.  Once the schema and root file are created, the
database files can be created by using the IMAGE/3000 utility DBUTIL.
Refer to the IMAGE/3000 Reference Manual for detailed information on how
to use DBUTIL.

DICTDBC prompts for information that identifies which database definition
in the data Dictionary is to be used.  It also prompts for information
that is used by the schema processor when generating a schema and a root
file.  The IMAGE/3000 utility DBSCHEMA is automatically executed by
DICTDBC. (For details on DBSCHEMA, see the IMAGE/3000 Reference Manual.)

DICTDBC will terminate when DBSCHEMA terminates.  Once the schema and
root file are created, the DBUTIL utility can be run to create the
database files.  (DICTDBC does not execute DBUTIL.) If errors prevent a
root file from being created, the corrections must be made in the
Dictionary before you can re-execute DICTDBC. The following description
tells how to execute DICTDBC and gives an explanation of each prompt.

To execute DICTDBC enter the following MPE command:

          RUN DICTDBC.PUB.SYS

After DICTDBC issues an acknowledgement message, you are prompted to
enter a password as follows:

          DICTIONARY PASSWORD>

The password entered must grant at least PROGRAMMER level access to the
Dictionary.  (See Appendix C for an explanation of the levels of access.)
If [[RETURN]] is pressed in response to this prompt, DICTDBC will
terminate.

Note that the password is not displayed on the terminal as it is entered.
However, if the password is not entered correctly, an error message is
displayed and the prompt reissued.

After the password is accepted, DICTDBC issues the following prompt:

          BASE>

Enter the name of the database for which a schema and root file are to be
created.  A definition for this database must already exist in the
Dictionary.  If it does not, an error message is displayed and the prompt
is reissued.  If [[RETURN]] is pressed in response to this prompt DICTDBC
will terminate.

Next, DICTDBC prompts for information to be used by the schema processor.
The first prompt allows you to specify the options to be used when the
schema is processed:

          CONTROL LINE>

Any of the following options may be entered in response to the above
prompt.  These options are the same ones as described for the $CONTROL
COMMAND in the IMAGE/3000 Reference Manual, except for BLOCKMAX. Note
that the BLOCKMAX option is defined differently here.  One or more of
these options may be entered, separated by commas.

LIST                      causes each source record of the schema to be
                          printed on the listfile.

NOLIST                    specifies that only source records with errors
                          be printed on the listfile.

ERRORS=nnn                sets the maximum number of errors to nnn.  nnn 
                          may have a value between 0 and 999, inclusive.
                          If more than three errors are detected, the
                          Schema Processor terminates.  The default value
                          is 100.

LINES=nnnnn               sets the number of lines per page on the
                          listfile nnnnn.  nnnnn may have a value between
                          4 and 32767, inclusive.  The default is 60 if
                          listfile is a line printer and 32767 if it is
                          not.

ROOT                      causes the Schema Processor to create a root
                          file if no errors are detected in the schema.

NOROOT                    prevents the Schema Processor from creating a
                          root file.

BLOCKMAX=nnnn             sets the maximum physical block length (in
                          words) for a data set.  If you do not include
                          this parameter, the value declared in the data
                          Dictionary is used.  If you entered [[RETURN]]
                          to the prompt for BLOCKMAX in the Dictionary,
                          the default value of 512 is used.  Refer to the
                          RELATE FILE command string in Section IV for an
                          explanation of BLOCKMAX.

TABLE                     causes the Schema Processor to write a table of
                          summary information about the data sets to the
                          listfile device if no errors are detected.

NOTABLE                   suppresses the TABLE option.

The defaults for the control line options are:  LIST, ROOT, and TABLE.

DICTDBC continues prompting for schema processor information as follows:

          SCHEMA FILE>

Enter the name of the schema file.  It can be a temporary or a permanent
file.  To create a process temporary file, press [[RETURN]] in response
to this prompt.  If the schema file is to be a permanent file, enter the
name of the file as your response.  If it is a new file, DICTDBC will
create the file.  If the file already exists, DICTDBC will issue a
warning before over-writing the file.

DBSCHEMA then generates an output listing of the schema and root file.
The response made to the next prompt determines where this listing is
sent:

          LIST FILE>

Enter one of the following options in response to this prompt:

LP               sends the listing to the line printer.

NULL             suppresses the listing.

filename         sends the listing to the existing or to a new disc file.
                 Before over-writing an existing file, you are prompted
                 to approve purging the existing file's contents.

*filename        sends the listing to the file identified in the back
                 referenced file equation.

Pressing [[RETURN]] in response to this prompt sends the listing to the
terminal.  If security was only defined for the data items and now the
security should only apply to the data set, enter YES to the following
prompt:

          APPLY SECURITY JUST TO SET LEVEL(N/Y)?>

If NO is entered or [[RETURN]] is pressed in response to this prompt, the
security specified for the data items is written into the schema file.
If YES is entered in response to this prompt, DICTDBC will write the set
level security into the schema file.  The set level security is derived
from the class or classes assigned to the set in the data Dictionary or,
if none are specified, it is extrapolated from data item security
specifications.

DICTDBC then executes the schema processor.  Regardless of whether a
schema and a root file are created, DICTDBC terminates after the schema
processor has executed.  If errors prevent a root file from being
created, the errors must be corrected before DICTDBC can be re-executed.

The following example shows how to execute DICTDBC and briefly explains
the responses to the prompts.

Example 

     :RUN DICTDBC.PUB.SYS                  Executes DICTDBC.

     <The Dictionary/3000 DB Creator program banner appears here.>

     DICTIONARY PASSWORD>                  Data Dictionary's password.

     BASE> SHPMGT                          Name of base to be created.

     CONTROL LINE>                         [[RETURN]] pressed; default used.

     SCHEMA FILE>                          [[RETURN]] pressed; session temporary
                                           file created.
     LIST FILE>                            [[RETURN]] pressed; listing sent to
                                           terminal.
     APPLY SECURITY JUST TO SET LEVEL(N/Y)?>   [[RETURN]] pressed; use item level
                                               security.
     SCHEMA GENERATION                     DICTDBC executes for you.

DBSCHEMA generates the following listing at your terminal:

     DBSCHEMA PROCESSOR
     PAGE 1   <The IMAGE/3000 DBSCHEMA program banner appears here.>

     BEGIN DATABASE SHPMGT;

     PASSWORDS:
                   1 SALESPER;
                   2 RECEIVING;
                   3 BUYER;
                   4 MANAGER;

     ITEMS:
          BUYER-NO,           X2       (3/4);
          DESCRIPTION,        X30           ;
          ITEM-NO,            X8            ;
          LIST-PRICE,         P12           ;
          PO-NUMBER,          U4            ;
          PRODUCT-NO,         U8            ;
          PURCHASE-COST,      P8            ;
          PURCHASE-DATE,      X6            ;
          PURCHASE-QTY,       P8            ;
          QTY-ALLOCATED,      P8            ;
          QTY-ON-HAND,        P8            ;
          QTY-ON-ORDER,       P8        (/2);
          QTY-REC,            P8            ;
          REORDER-PT,         P8            ;
          UNIT-COST,          P12     (/3,4);
          VENDOR-NO,          X8      (/3,4);

     SETS:

     NAME:   PRODUCT-MASTER,  MANUAL    (1,2/3,4);
     ENTRY:  PRODUCT-NO      (1),
             DESCRIPTION,
             QTY-ON-HAND,
             QTY-ALLOCATED,
             UNIT-COST,
             LIST-PRICE;
     CAPACITY: 101;

     NAME:   PO-MASTER,       MANUAL    ;
     ENTRY:  PO-NUMBER       (1);
     CAPACITY: 311;

     NAME:   ITEM-MASTER,     MANUAL     (1,2/3,4);
     ENTRY:  ITEM-NO         (3),
             DESCRIPTION,
             QTY-ON-HAND,
             QTY-ON-ORDER,
             QTY-ALLOCATED,
             PURCHASE-COST,

             REORDER-PT;
     CAPACITY: 311;

     NAME:   ITEM-DETAIL,     DETAIL      (/3,4);
     ENTRY:  ITEM-NO         (!ITEM-MASTER     ),
             VENDOR-NO,
             BUYER-NO;
     CAPACITY: 507;

     NAME:   EXPLODE,         DETAIL   (1,2,3/4);
     ENTRY:  ITEM-NO         ( ITEM-MASTER     ),
             PRODUCT-NO      (!PRODUCT-MASTER  );
     CAPACITY: 1023;

     NAME:   COSTING,         DETAIL    (/2,3,4);
     ENTRY:  ITEM-NO         ( ITEM-MASTER     (PURCHASE-DATE   )),
             PURCHASE-DATE,
             PURCHASE-QTY,
             PO-NUMBER       (!PO-MASTER       ),
             QTY-REC;
     CAPACITY: 1032;

     END.

      DATA SET      TYPE  FLD  PT  ENTR  MED  CAPACITY  BLK  BLK   DISC
        NAME              CNT  CT  LGTH  REC            FAC  LGTH  SPACE

     PRODUCT-MASTER    M  6    1   29    39    101      13   508   36
     PO-MASTER         M  1    1   2     12    311      42   507   36
     ITEM-MASTER       M  7    3   29    49    311      10   491   132
     ITEM-DETAIL       D  3    1   9     13    507      39   510   56
     EXPLODE           D  2    2   8     16    1023     31   498   136
     COSTING           D  5    2   13    21    1032     24   506   176
                                TOTAL DISC SECTORS INCLUDING ROOT: 583

     NUMBER OF ERROR MESSAGES: 0
     ITEM NAME COUNT: 16      DATA SET COUNT: 6
     ROOT LENGTH: 630     BUFFER LENGTH: 510     TRAILER LENGTH: 256

     ROOT FILE SHPMGT CREATED.             Schema and root file created.

     END OF PROGRAM


MPE/iX 5.0 Documentation