HP 3000 Manuals

Dictionary Structure Commands [ HP SYSTEM DICTIONARY XL SDMAIN ] MPE/iX 5.0 Documentation


HP SYSTEM DICTIONARY XL SDMAIN

Dictionary Structure Commands 

System Dictionary is based on the Entity-Relationship model.  (See the HP 
System Dictionary/XL General Reference Manual, Volume 1 (32256-90004) for
a complete description.)  Its structure consists of entity types,
relationship types, relationship classes, and attributes.  System
Dictionary supports a predefined set of entity types, relationship types,
relationship classes, and attributes known as the core set.  (See the HP 
System Dictionary/XL General Reference Manual, Volume 1 (32256-90004) for
the complete listing of core set structures.)

Subsystem Support 

The purpose of the core set is to provide a standard set of entity types,
relationship types, relationship classes, and attributes that are
commonly used.  This supports the description of the following:

 *  MPE files
 *  KSAM files
 *  Image
 *  HP IMAGE
 *  HP SQL
 *  Vplus forms
 *  MPE accounting structure
 *  Network Spooler devices and device classes
 *  Rapid/V (with some conversion)
 *  Network directory
 *  COBOL data definitions
 *  Pascal data definitions (subset of Pascal data types)
 *  RPG programs

Additionally, you may customize your dictionary to describe your
particular subsystems and applications.

Customizing the Dictionary 

Once you begin working in the dictionary, you may discover that a certain
entity type needed in your particular installation is not provided in the
core set.  You may create this entity type by means of the structure
command CREATE ENTITY-TYPE. For example, if you need to know which
documents are filed in which filing cabinet, you may create the entity
type filing-cabinet and associate it with (relate it to) the entity type
document.  In order to do this, a new relationship type called
file-cabinet contains document would also have to be created.

The ability to make such changes to the System Dictionary structure is
provided by the structure commands.  To use these commands, the
dictionary must be opened in customization mode and in either the DA
scope or a scope with extend capability.

You cannot modify a compiled dictionary.  If you specify any of the
dictionary structure commands with a compiled dictionary, System
Dictionary issues an error message.  Table 3-3 lists the structure
commands and their subcommands.  The specific syntax for each of these
commands is shown in Chapter 4, "System Dictionary Commands" .

          Table 3-3.  Dictionary Structure Commands and Subcommands 

---------------------------------------------------------------------------------------------
|                                |                                                          |
|            COMMAND             |                       SUBCOMMAND *                       |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| ADD                            | ENTITY-TYPE-ATTRIBUTE | RELATIONSHIP-TYPE-ATTRIBUTE      |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| CREATE                         | ATTRIBUTE | ENTITY-TYPE | RELATIONSHIP-CLASS |           |
|                                | RELATIONSHIP-TYPE                                        |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| DELETE                         | ATTRIBUTE | ENTITY-TYPE | RELATIONSHIP-CLASS |           |
|                                | RELATIONSHIP-TYPE                                        |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| MODIFY                         | ATTRIBUTE | ENTITY-TYPE | ENTITY-TYPE-ATTRIBUTE |        |
|                                | RELATIONSHIP-CLASS | RELATIONSHIP-TYPE |                 |
|                                | RELATIONSHIP-TYPE-ATTRIBUTE                              |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| REMOVE                         | ENTITY-TYPE-ATTRIBUTE | RELATIONSHIP-TYPE-ATTRIBUTE      |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| RENAME                         | ATTRIBUTE | ENTITY-TYPE | RELATIONSHIP-CLASS             |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| RESTRUCTURE                    |                                                          |
|                                |                                                          |
---------------------------------------------------------------------------------------------

* Where | means OR.

The following is a list of the dictionary structure commands and a
description of each.

ADD              Associates attributes to entity types or relationship
                 types.  The attributes and the entity types or
                 relationship types must already exist in the dictionary.

CREATE           Creates new entity types, relationship classes,
                 relationship types, and attributes.

DELETE           Deletes entity types, relationship classes, relationship
                 types, and attributes.

MODIFY           Changes the characteristics of entity types,
                 relationship classes, relationship types, relationship
                 type-attribute pairs, entity type-attribute pairs, and
                 attributes.

REMOVE           Disassociates attributes from entity types or
                 relationship types.  The opposite of the ADD command.

RENAME           Renames an entity type, a relationship class, or an
                 attribute.

RESTRUCTURE      Restructures a dictionary, incorporating any structure
                 changes that you have made.  Restructuring is done
                 automatically when the EXIT command is issued, when you
                 change the open or name mode, or when you open a new
                 dictionary.

Example 

The following example provides an illustration of how to open the
dictionary, create a new attribute and entity-type, and then associate
the new attribute to the new entity-type.

>DEFINE DICTIONARY = sysdic;                        Opens the dictionary with the
                                                    Dictionary Administrator scope and
>>SCOPE = dictionary-administrator;                 customization open mode.

>>PASSWORD = da;

>>OPEN MODE = customization.

>CREATE ENTITY-TYPE terminal.                       Creates a new entity-type called
                                                    terminal.

>CREATE ATTRIBUTE terminal-type;                    Creates a new attribute called
                                                    terminal-type as a character
>>TYPE=c;                                           string containing 30 bytes.

>>LENGTH=30.

>ADD ENTITY-TYPE-ATTRIBUTE terminal;                Associates the attribute
                                                    terminal-type to entity-type
>>ATTRIBUTE = terminal-type.                        terminal.

>EXIT                                               Exits the SDMAIN program,
                                                    restructuring the dictionary to
                                                    incorporate the added structure.



MPE/iX 5.0 Documentation