HP 3000 Manuals

DICTDBD [ DICTIONARY 3000 ] MPE/iX 5.0 Documentation


DICTIONARY 3000

DICTDBD 

Database Definition Utility 

The Database Definition utility (DICTDBD) enters the definition for an
existing IMAGE database into the Dictionary.  DICTDBD creates the entries
for the database, the data sets, and the data items by using the root
file.  The database is entered in the Dictionary as a BASE type file.
The automatic, master and detail data sets are entered as AUTO, MAST, and
DETL type files respectively.  The data items are entered as elements.
DICTDBD also establishes the associations of the data items to the data
sets and the relationships of the data sets to the database.

However, the existing security defined for the database is not
transferred to the Dictionary by DICTDBD. To create or redefine security
for the database, use the Dictionary Database Maintenance program
(DICTDBM). See Section III of this manual on how to define security for a
database.

Before the definition of the database is entered into the Dictionary,
DICTDBD checks the existing entries to ensure that the database does not
already exist in the Dictionary.  If the database name is the same as the
name for an existing entry, a message is issued.  You are given the
option to change the name of the database or to terminate DICTDBD.
DICTDBD also checks the existing entries to avoid entering duplicate or
redundant entries for data sets and data items.  If any of the names used
for the data sets or data items is the same as the name for an existing
entry, a message is issued.  For duplicate data sets and data items, you
are given the option to either enter a new name for that entity or to use
the existing entity in the Dictionary.

Whenever a name is changed for an entity being loaded into the
Dictionary, the new name entered becomes the "primary" name for that
entity.  The original name then becomes the "alias" name for that entity
in the Dictionary.  Because HP Inform will reference these entities by
their aliases, the original names used by VPLUS do not have to be changed
to be consistent with the Dictionary.  However, since DICTDBM uses the
primary names for all entities, it is important to remember what the new
primary names are for the entities whose names were changed.  The
following description explains how to execute DICTDBD and gives an
explanation of each prompt.  To execute DICTDBD enter the following MPE
command:

          RUN DICTDBD.PUB.SYS

After an acknowledgement message, DICTDBD prompts for a password to open
and read the Dictionary.  The prompt is:

          DICTIONARY PASSWORD>

The password that you enter must grant at least PROGRAMMER level access
to the Dictionary.  (See Appendix C for an explanation of the levels of
access.)  If you press [[RETURN]] in response to this prompt, the utility
terminates.

The password that you enter is not displayed on your terminal, but if it
is not entered correctly, an error message is displayed and the prompt
reissued.

After accepting the password you entered, the utility prompts you to
enter specific database identification information as follows:

        BASE>

        BASE PASSWORD>

        MODE>

You respond to the prompt for BASE by entering the name of the database
to be defined in the Dictionary for you.  The BASE PASSWORD prompt should
grant read access to the utility for the named database.

The MODE prompt indicates the access mode to be used by the utility to
open and read the database.  The database can be opened in any mode.  If
[[RETURN]] is entered as the response, the base is opened in the default
mode which is 5.  (Refer to the IMAGE/3000 Reference Manual for details
on "Access Modes" .)

The process of transferring the definition of the database begins after
you respond to the prompt for MODE. A message "LOADING DATA DICTIONARY"
is displayed.  The utility begins by checking whether the entire
definition of the database will fit in the Dictionary.  If it will not,
the following prompt is issued:

          ENTIRE DEFINITION OF DATABASE WILL NOT FIT IN DICTIONARY.
          PROCEED (N/Y)?

A response of "N" or [[RETURN]] terminates the utility.  Responding "Y"
allows the utility to continue; however, the utility will issue an error
message and terminate when any one of the data sets is full.  Note that
if the entire definition of the database will not fit in your Dictionary,
you can run DICTINIT to re-initialize Dictionary with larger capacities
specified (see Appendix C).

Next, the utility checks the schema of the named database with the
entries in the Dictionary.  If there are no entries identical to those in
your database, the transfer is completed and the DICTDBD utility program
is terminated.  You can immediately execute the DICTDBM program and see
the transferred database definition.

If an entry already exists for the database name, the following message
and prompt are issued:

     *ERROR: BASE ALREADY DEFINED IN DATA DICTIONARY
          DO YOU WANT TO LOAD UNDER A DIFFERENT NAME(Y/N)?>

A response of an "N" terminates the execution of the program.  If a "Y"
or [[RETURN]] is entered, the following prompt to rename your database is
issued:

     NEW BASE NAME>

The name you enter must be unique - that is, it must not already exist in
the Dictionary.  If it does, an error message is displayed and the prompt
reissued.  The utility program terminates if [[RETURN]] is entered as
your response to this prompt.

Next the ITEMS as listed in the schema are checked.  If there are no
existing Dictionary entries, the loading process continues.  If an entry
already exists and is compatible with the item in the database, the
following message and prompt are displayed:

     COMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT element 

     USE EXISTING DEFINITION(N/Y)?>

If you enter a "Y" , the loading process continues.  If you enter an "N"
or [[RETURN]], you are prompted to rename the element as follows:

     NEW PRIMARY ELEMENT NAME>

A unique name for the element must be entered.  The name for the item in
your database becomes the alias name for the item in the Dictionary.  If
you enter [[RETURN]], the program does not load the element into the
Dictionary and issues the following warning:

     *WARNING: ELEMENT HAS NOT BEEN LOADED INTO DICTIONARY

Then the loading process continues.  Each time an existing compatible
entry is encountered, the above sequence occurs.  If an incompatible item
is encountered, the following sequence occurs:

     INCOMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT element 

     NEW PRIMARY ELEMENT NAME>

You must enter a unique element name in response to the prompt.  If you
enter [[RETURN]], the program does not load the element into the
Dictionary and issues a warning message.

After checking the data items, the utility compares the data set
definitions with existing Dictionary entries.  The definition of a data
set includes the data items within the set.  If there are no other
identical entries, the transfer is completed and the program terminates.

If an identical entry for the data set exists, the following message and
prompt are issued:

     DEFINITION ALREADY IN DICTIONARY FOR SET set 

     USE EXISTING DEFINITION(N/Y)?>

If you respond with an "N" , you are prompted to rename the set as
follows:

      NEW PRIMARY FILE NAME>

A new, unique name, must be entered.  By entering "Y" or [[RETURN]], the
data set is not loaded and a warning message as follows is issued:

     *WARNING: DATA SET HAS NOT BEEN LOADED INTO DICTIONARY

Each time the program encounters an existing identical definition, the
above process is repeated.  If an existing definition is incompatible,
the following message and prompt are issued:

     DEFINITION ALREADY IN DICTIONARY FOR SET set 

     NEW PRIMARY FILE NAME>

A unique name must be entered for the data set.  If [[RETURN]] is used, a
warning is issued.

The above process continues until the entire schema has been compared
with existing Dictionary entries.  When the comparison is complete, the
transfer, where indicated by your responses to the prompts, is completed.
The DICTDBM program could be executed to view the transferred definition.

The following examples show how to execute the Database Definition
utility with a brief explanation of the prompts and responses.

In the first example, the database is unique, and no renaming is
required.  The second example shows a database that is not totally unique
and the prompts issued by the utility to resolve the definition transfer.

Example 

The following example shows the use of DICTDBD, using a unique database
name:

     :RUN DICTDBD.PUB.SYS                  How to execute this utility.

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

     DICTIONARY PASSWORD>                  Password that grants modify
                                           access used.
     BASE> SHPMGT                          Name of existing IMAGE database.

     BASE PASSWORD>                        MANAGER is password used.

     MODE>                                 [[RETURN]] pressed; default used.
     LOADING DATA DICTIONARY               Utility loading definition of
                                           base into data Dictionary.

     END OF PROGRAM

The following example shows how DICTDBD is used to rename the database
name:

     :RUN DICTDBD.PUB.SYS                  How to execute this utility.

     <The Dictionary/3000 DB Info Loader program banner appears here.>
     DICTIONARY PASSWORD>                  Password that grants modify access.

     BASE> SHPMGT                          Base to be defined in Dictionary.

     BASE PASSWORD>                        MANAGER was used.

     MODE>                                 [[RETURN]] pressed; default used.

     LOADING DATA DICTIONARY
     *ERROR: BASE ALREADY DEFINED IN DATA DICTIONARY

     DO YOU WANT TO LOAD UNDER A DIFFERENT NAME(Y/N)?>Y
     NEW BASE NAME> MYSHPM                 Will be name of base in Dictionary.

      COMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT DESCRIPTION

     DO YOU WANT ELEMENT TO HAVE A DIFFERENT NAME(N/Y)?>   [[RETURN]] pressed.
      COMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT ITEM-NO

     DO YOU WANT ELEMENT TO HAVE A DIFFERENT NAME(N/Y)?> Y

     NEW PRIMARY ELEMENT NAME> MY-ITEM-NO

       COMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT QTY-REC

     DO YOU WANT ELEMENT TO HAVE A DIFFERENT NAME(N/Y)?> Y

     NEW PRIMARY ELEMENT NAME>             [[RETURN]] pressed.

     *WARNING: DATA ELEMENT QTY-REC HAS NOT BEEN LOADED INTO DICTIONARY

       INCOMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR ELEMENT PO-NUMBER

     NEW PRIMARY ELEMENT NAME>             [[RETURN]] pressed.

     *WARNING: DATA ELEMENT PO-NUMBER HAS NOT BEEN LOADED INTO DICTIONARY

      DEFINITION ALREADY IN DICTIONARY FOR SET PRODUCT-MASTER

     USE EXISTING DEFINITION(N/Y)?> Y      "Y" to use existing definition.
      DEFINITION ALREADY IN DICTIONARY FOR SET ITEM-MASTER

     USE EXISTING DEFINITION(N/Y)?>        [[RETURN]] pressed; existing definition
                                           not used.
     NEW PRIMARY FILE NAME> PARTS-MASTER

      DEFINITION ALREADY IN DICTIONARY FOR SET EXPLODE

     USE EXISTING DEFINITION(N/Y)?> N

     NEW PRIMARY FILE NAME>                [[RETURN]] pressed.

     *WARNING: DATA SET EXPLODE HAS NOT BEEN LOADED INTO DICTIONARY

      INCOMPATIBLE DEFINITION ALREADY IN DICTIONARY FOR SET COSTING

     NEW PRIMARY FILE NAME> MY-COSTING

     END OF PROGRAM


MPE/iX 5.0 Documentation