HP 3000 Manuals

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


HP SYSTEM DICTIONARY XL SDMAIN

Dictionary Reporting Commands 

System Dictionary provides the capability to report on both the
dictionary structure and the dictionary data.  Two options exist when
retrieving information about the dictionary structure:  (1) you can
retrieve all structure information, or (2) you can retrieve only the
names of specified entries.  However, you can produce complex reports
when retrieving information on dictionary data.  Data reporting allows
retrieval of information on both data definitions (such as entity
definitions) and relationship information.

You can specify and store reports on dictionary data for future use.
After a report is stored, you can execute it at any time by using the
EXECUTE command.

To report on dictionary structure, the dictionary may be open in any open
mode.  However, to report on dictionary data, the dictionary must be open
in read-only, shared-update, or exclusive-update mode.

The System Dictionary reporting commands allow great flexibility through
use of various selection criteria.  These criteria allow selection of
fields to be returned through use of relational and Boolean operators.
For example, you can retrieve all values that start with an E or a G and
end with a D. These selection criteria are discussed later in this
chapter.

You cannot modify a compiled dictionary.  The only dictionary reporting
commands you can specify with a compiled dictionary are DISPLAY, EXECUTE,
and REPORT. If you specify any of the other dictionary reporting
commands, System Dictionary issues an error message.  Table 3-5 lists the
dictionary reporting commands and subcommands in System Dictionary.  A
detailed description of each command is located in Chapter 4, "System
Dictionary Commands."

          Table 3-5.  Dictionary Reporting Commands and Subcommands 

--------------------------------------------------------------------------------------------
|                           |                                                              |
|          COMMAND          |                         SUBCOMMAND *                         |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| COPY                      | REPORT                                                       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| DELETE                    | REPORT                                                       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| DISPLAY                   | ATTRIBUTE | DOMAIN | ENTITY-TYPE | RELATIONSHIP-CLASS |      |
|                           | ENTITY-TYPE-ATTRIBUTE | RELATIONSHIP-TYPE |                  |
|                           | RELATIONSHIP-TYPE-ATTRIBUTE | REPORT | SCOPE | VERSION       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| EDIT                      | REPORT                                                       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| EXECUTE                   |                                                              |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| MODIFY                    | REPORT                                                       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| RENAME                    | REPORT                                                       |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| REPORT                    | ENTITY | RELATIONSHIP                                        |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| SAVE                      |                                                              |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| START                     |                                                              |
|                           |                                                              |
--------------------------------------------------------------------------------------------

* Where | means OR The following is a list of the dictionary reporting
commands and a description of each.

COPY             Makes copies of reports that have been stored.

DELETE           Deletes a previously stored report from the dictionary.

DISPLAY          Generates reports on dictionary structure, in contrast
                 to the REPORT command, which generates reports on
                 dictionary data.  There are two available options:  (1)
                 the report lists structure names only, or (2) the report
                 lists structure names, plus all other associated
                 information.

EDIT             Edits a stored report definition or description.

EXECUTE          Processes a stored report.

MODIFY           Allows the addition of a description to a report or the
                 modification of an existing report description or scope
                 owner.

RENAME           Allows the name of a stored report to be changed.

REPORT           Generates reports on dictionary data, in contrast to the
                 DISPLAY command, which generates reports on dictionary
                 structure.

SAVE             Stores a report definition and also marks the end of
                 this definition.

START            Marks the beginning of a report definition.

Selection Criteria 

The SDMAIN reporting commands allow a variety of selection criteria that
provide flexibility when producing reports.  Unless otherwise noted, you
can use any of the selection criteria discussed below with any parameter
for the commands that return information from the dictionary (the
DISPLAY, EXECUTE, and REPORT commands).  These criteria allow
qualification of fields of the returned items using relational and
Boolean operators.

Any keyword (or attribute qualifier in the ATTRIBUTE-LIST keyword) that
is omitted (except for the keyword flags) means that any value for that
item is acceptable to you.  For example, if displaying attributes and
TYPE = R is specified, but no LENGTH keyword is declared, the returned
attribute is accepted if it is a real value, regardless of its length.
However, if LENGTH = 4 is specified, then only real values of length 4
are returned.

Wild Card Characters.  You can enter a string of characters with "wild
card" characters embedded.  The "wild card" characters have the following
meanings:

     ^   Match any 0 or more characters

     !   Match any SINGLE character

You can use the characters at any point within the character string.
Additionally, you can use them in any combination.  For example, to
specify that one or more characters are allowed in a particular position,
you can use an "!" for one character followed by a "^" for the additional
characters.

Relational and Boolean Operators.  Relational and Boolean operators are
available and operate on character or numeric values according to the
following rules:

     expression --> [expression connector]  primary
     primary    --> [operator] value  |  (expression)

     where  | means OR

operator         An optional field that can contain one of the following
                 relational operators:

                 =                Equal to

                 <>               Not equal to

                 <                Less than

                 <=               Less than or equal to

                 >                Greater than

                 >=               Greater than or equal to

                 If an operator is omitted, the default "= " (equal to)
                 is used.

value            A character string (with possible embedded wild card
                 characters) or numeric value to be compared to values
                 retrieved from the dictionary.

                 If the value specified is rejected as a valid name in
                 the dictionary (contains an illegal character, blanks,
                 or is longer than 32 characters), then it must be
                 enclosed within quotation marks.  (See "User-Defined
                 Names" in Chapter 3 for a description of valid and
                 invalid characters.)

connector        A Boolean connection between qualifying values.  The
                 following connectors are allowed:

                 AND              Selected field must contain both
                                  values.

                 OR               Selected field must contain one or both
                                  values.

Operator Precedence.  The order in which the selection criteria is
processed is:

   1.  Operator qualifying the value

   2.  Expressions enclosed in parentheses

   3.  AND

   4.  OR

Examples.  The following are examples showing the use of selection
criteria.

PROD^ and ^NO             Values that begin with PROD and end with NO are
                          selected.

PROD^ or ^ACCT^           Values that begin with PROD or contain ACCT
                          somewhere in them are selected.

A^Z                       Values that begin with an A and end with a Z
                          with any number of any characters between are
                          selected.

M!!                       Values that consist of M followed by any two
                          characters are selected.

A!^                       Values that consist of A followed by one or
                          more characters are selected.

<= B or >= Y              Values that are less than or equal to B or are
                          greater than or equal to Y are selected.

45 or > 60                Values that are equal to 45 or are greater than
                          60 are selected.

E^ OR G^ AND ^D           Values that begin with an E or that begin with
                          a G and end with a D are selected.

(E^ OR G^) AND ^D         Values that begin with an E or a G and end with
                          a D are selected.

(10) OR (<15 AND >12)     Values that are equal to 10 or are between 12
                          and 15 are selected.

Example 

The following example illustrates the use of System Dictionary reporting
commands:

>DEFINE DICTIONARY                                  Opens the dictionary in
                                                    exclusive-update mode in the
>>SCOPE = data-administrator;                       latest production version of the
                                                    common domain.
>>PASSWORD = da; 

>>OPEN-MODE = exclusive-update. 

>CONFIGURE OUTPUT = rptfile.                        Configures the output environment
                                                    with rptfile as the output file.

>DISPLAY ENTITY-TYPE terminal.                      Displays the entity-type terminal.

>DISPLAY ATTRIBUTE a^;                              Lists the names of all attributes
                                                    beginning with the letter "a" .
>>NAME-ONLY. 

>START                                              Marks the beginning of a report
                                                    definition.  Command execution is
                                                    disabled until the SAVE command is
                                                    encountered, marking the end of
                                                    the report definition.
>CONFIGURE                                          Specifies a 15-space right margin
                                                    and a 10-line top margin, when
>>RIGHT = 15;                                       output is directed somewhere other
                                                    than the terminal.
>>TOP = 10. 

>REPORT ENTITY;                                     The reporting command that defines
                                                    what information appears on the
>>ENTITY-TYPE = element.                            report.  In this case, the report
                                                    provides information on all
                                                    entities of entity-type element.

>SAVE element-report;                               Saves the report with the name
                                                    element-report and an appropriate
>>DESCRIPTION = "Report to provide complete data    description.  Command execution is
                                                    again enabled.
>>about occurrences of entity-type element.". 

>EXECUTE element-report.                            Executes the stored report.

>EXIT                                               Terminates the program.



MPE/iX 5.0 Documentation