HP 3000 Manuals

USING COMMANDS TO DEFINE PROCEDURES [ DICTIONARY 3000 ] MPE/iX 5.0 Documentation


DICTIONARY 3000

USING COMMANDS TO DEFINE PROCEDURES 

The Dictionary can be used to capture the data processing environment for
your company by defining all the application programs, the routines, the
subroutines, and the variables used in the Dictionary.  The Dictionary
uses PROCEDURES to document this information.  Each program, routine, or
subroutine is a procedure in the Dictionary.  The variables used by each
are data elements with characteristics such as type, size, and so forth.

A program and its routines or subroutines can be described in the
Dictionary by defining a hierarchical relationship between them.  The
RELATE command is used to establish this hierarchical relationship.
(Refer to Section IV of this manual description of this command.)  The
hierarchical relationship for procedures is summarized in Figure 3-3.
____________________________________________________________________________
|                                                                          |
|                                PROCEDURE       <----  PARENT procedure   |
|                                    |                                     |
|                      --------------|--------------                       |
|                     |              |              |                      |
|                     |              |              |                      |
|                 PROCEDURE ...     data        PROCEDURE      <----  CHILD|
|                                 elements                       procedure |
|                 /   |   \                         |                      |
|                /    |    \                        |                      |
|            data     |     \                      data                    |
|          elements   |      \                   elements                  |
|                     |       \                                            |
|                                                                          |
|                 PROCEDURE    PROCEDURE   <----  PARENT/CHILD procedures  |
|                                                                          |
|                  /  |            |    \                                  |
|                 /   |            |     \                                 |
|                     |            .      \                                |
|             data    |            .                                       |
|           elements  |            .          data                         |
|                     |                          elements                  |
|                     |                                                    |
|                     |                                                    |
|                 PROCEDURE     <----  CHILD procedure                     |
|                     |                                                    |
|                     |                                                    |
|                    data                                                  |
|                   elements                                               |
|                                                                          |
____________________________________________________________________________

          Figure 3-3.  Summary of Hierarchical Structure for a Procedure 

The procedure that uses or calls other procedures is at the top of the
structure and is a PARENT procedure.  The routines and/or subroutines
used or called by the PARENT procedure are CHILD procedures.  A CHILD
procedure can in turn be a PARENT because it may use or call other
routines or subroutines.  This hierarchical structure allows data
elements to be associated with a procedure regardless of their level in
the structure.

Note that Dictionary/3000 will not allow you to document recursive
procedures.  That is, if a procedure has been documented as a CHILD of
another procedure, Dictionary/3000 will not allow you to specify that
other procedure as a CHILD of the first one.

The following description outlines the steps involved when you use the
DICTDBM commands to define procedures.  A complete description including
examples for all the commands is given in Section IV of this manual.

Creating Data Elements and Procedures 

The method for creating procedures and data elements is similar to
creating files and data elements for a database.  To define them, use the
command string CREATE PROCEDURE or CREATE ELEMENT. An element or a
procedure must be defined in your Dictionary before you can associate it
with or relate it to another entry.  The name used for the procedure or
the element must be unique.  Use the REPEAT option before the command
string to create definitions for more than one procedure or element
without having to reenter the command.

After the entries have been created, you can use the LIST or DISPLAY
commands to display those entries.  If you want to delete an entry, use
the PURGE command.  To change an entry, use either the MODIFY command or
the RENAME command.

Relating Procedures to Procedures 

Procedures may be related to other procedures by establishing a
hierarchical relationship between the procedures with the RELATE command.
Use the command string RELATE PROCEDURE to define this relationship.
This command allows more than one CHILD procedure to be related to a
PARENT procedure during the command cycle.  If relationships are to be
established for more than one PARENT procedure, use the REPEAT option
with the command string.

Relationship entries can be displayed by using the SHOW command.  For a
PARENT procedure, the SHOW command displays the data elements associated
with it, the CHILD procedures related to it, and optionally, the data
elements associated with each CHILD. For a CHILD procedure, only the data
elements associated with it are displayed.  The elements are displayed in
the physical order of their association with the procedure, and the CHILD
procedures are displayed in the physical order they were related to the
PARENT procedure.

The REPORT command can be used to display an alphabetized list of the
elements used by a procedure.  It can also be used to show the CHILD
procedures used by the PARENT procedure.

To delete the relationship between entries use the REMOVE command.  To
change the relationship, use the CHANGE command.  To change the physical
order in which the CHILD procedures are related to the PARENT procedure,
use the REORDER command.

Adding Data Elements to Procedures 

The ADD command is used to associate data elements with a procedure.  Use
the command string ADD PROCEDURE to define the association.  An entry is
defined that associates the element with the procedure.  To display the
entries, use either the REPORT command or the SHOW command.

An association entry can be deleted by using the DELETE command or it can
be changed by using the UPDATE command.  If you want to change the
physical order in which the associated entries were made, use the
RESEQUENCE command.


MPE/iX 5.0 Documentation