Retrieval Model Administration

This section covers the following topics:


Retrieval Models - The Basic Concepts

Information on the relationships of objects and the structure of an information system as a whole can be retrieved with the function Execute retrieval model. Defining a retrieval model involves:

  • defining a retrieval structure

  • defining a layout for the reports to be created.

The basic concepts of retrieval models are described in this section. A more detailed description of the various facilities is then given with the description of the parameters in the section Defining and Maintaining a Retrieval Model.

What is a Retrieval Structure ?

The function Execute retrieval model does not report on the metadata model of an information processing system as a whole, but reports on any part of the metadata model which matches the retrieval structure defined in the retrieval model.

Two simple examples for such a retrieval structure are:

  • Programs that belong to a system:

  • Programs contained in systems, files used by the programs and databases these files belong to:

Rules Applying to Retrieval Structures

Retrieval Structures are Type-Specific

All retrieval structures are defined for a specific object type. When applying a retrieval model, an object of this type is used as the start object for scanning the metadata model for the specified structure and reporting the results.

Retrieval Structures are Defined as Hierarchical Tree Structures

A retrieval structure is defined as a hierarchical tree structure. Each object type is specified with respect to another object type on a higher level.

Note:
Predict metadata models are entity relationship models, and hierarchical levels in a retrieval structure do not therefore reflect any top-down hierarchy of the metadata model. Using hierarchical levels in a retrieval structure is simply a way of expressing which object types on lower levels are linked to which object types on higher levels.

Retrieval Structures can be Divided into Sub-structures

A retrieval structure can be seen as logically divided into sub-structures. A sub-structure starts at any object type and includes all subsequent object types on lower levels. In the example above, one possible sub-structure (file-database-file) is highlighted.

Retrieval Structures and Sub-structures can be Executed Recursively

A retrieval (sub-)structure can be executed several times to report on matching (sub-)structures starting with a recursive association, thus building up a nested structure.

If, for example, the substructure program-file-database in the first of the two examples in What is a Retrieval Structure? was executed with depth three, the retrieval structure shown in the diagram below results. The repetitions start with a recursive association of type Program-Program.

Defining and Maintaining a Retrieval Model

Enter code R in the Metadata Administration menu to display the Retrieval Model Administration Menu. This menu provides functions to create and maintain retrieval models.

    13:13:02            *****  P R E D I C T  *****                     2007-05-31
                      - Retrieval Model Administration Menu -
   
   
                         Function
   
                         A  Add a retrieval model
                         C  Copy retrieval model
                         D  Display retrieval model
                         M  Modify retrieval model
                         N  Rename retrieval model
                         P  Purge retrieval model
                         S  Select retrieval model
                         X  Cross reference retrieval model
   
    Function ...........
   
    Model ..............    for type ..*
    Copy model .........
   
    Command ===>
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
           -     -    Canc   -     -     -    Print  -    Let   FLIP   -    Menu
   
  
Parameters
Function To select one of the functions of the Retrieval Model Administration Menu. The functions are described in the following sections.
Model

Two alphanumeric characters identifying the retrieval model. Must start with a letter and be unique for each object type.

For example: a retrieval model ZZ can be defined for systems, and another retrieval model ZZ can be defined for files.

for type The retrieval model is to be applied to this object type (for example, FI for file).
Copy Model A new retrieval model can be defined by copying and modifying a retrieval model that already exists. Enter new model code here.

Note:
Defining a retrieval model is not a trivial task. You are recommended to outline the retrieval structure on paper before you start defining it in the system. When you define the layout of reports that a retrieval model will produce, Predict assists you by immediately showing the effect of the layout parameters.

Add / Modify Retrieval Model - Codes A, M

The Add and Modify functions of the Retrieval Model Administration Menu use the same three screens. These screens are described in the following sections:

First Screen - General Settings

In the first screen, general characteristics of a retrieval model are defined and the retrieval model can be described.

   13:13:17            *****  P R E D I C T  *****                     2007-05-31
                       - Add Retrieval Model Definition -
    Model............ JP
    Retrieval for.... Database
   
   
    Model description                Userexits
                                       Use U-MODEL.....: N   (Y/N/A)
                                       Use U-XREF......: N   (Y/N)
   
                                     
   
    Abstract     Zoom: N
   
  
Parameters
Model description Up to three lines of 17 characters can be entered. This description is displayed in any Select retrieval model window and by the Select retrieval model function.
Abstract Up to 16 lines of 30 characters each can be entered.
User exits Two user exits can be activated: U-MODEL and U-XREF.
U-MODEL applies to retrieval type Execute retrieval model with output modes Structured list and Cross reference. Valid values:
Y The data collected will be handled exclusively by the user exit.
N The user exit will not be called (default).
A A report as defined in the retrieval model will be created and the data will be handled by the user exit additionally.
U-XREF applies to retrieval type Execute retrieval model with output mode Cross reference. Valid values:
Y The user exit will be called.
N The user exit will not be called (default).
Both user exits are described in the section User Exits of this documentation.

Second Screen - Defining the Retrieval Structure

In the second screen, the retrieval structure is defined.

  13:13:44             *****  P R E D I C T  *****                     2007-05-31
                       - Add Retrieval Model Definition -                        
  Model ........... LP                                                           
  Retrieval for ... Program                                                      
                                                                               
                                        
                                      Association                  Related 
    No  Level   Object type  Link*  A/P Code* Title       Depth  Object type
     1   1          PR        C         PR   Uses PR       3         PR       
     2   2          PR        C         FI   Uses PR       __        FI       
     3   3          FI        C         TR   Has TR        __        TR       
     4   __                   _         __                 __                 
     5   __                   _         __                 __                 
     6   __                   _         __                 __                 
     7   __                   _         __                 __                 
     8   __                   _         __                 __                 
     9   __                   _         __                 __                 
    10   __                   _         __                 __                 
    11   __                   _         __                 __                 
    12   __                   _         __                 __                 
    13   __                   _         __                 __                 
    14   __                   _         __                 __      
            
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
         -     -    Stop   -     -    Flip  Print        -     -     -     -     

A line in this screen represents an association between two object types. A relation between the various lines (associations) is established via the level number:

On the first level the object type for the whole retrieval model is entered. In the above example PR (Program).

The object type on the second level results from the related type of the last line on level one. In the above example PR (Program).

The object type on the third level results from the related type of the last line on level two. In the above example FI (File).

Up to 20 levels can be defined that way.

An association can be identified uniquely with the object type, association code and and the link direction.

This has the following effects on the retrieval models:

  1. The object type always results from the level number of the previous line.

  2. Link and code must be entered and define the association.

  3. The title and the related object type result from the chosen association.

Editing the Retrieval Structure with Line Commands

The following line commands can be entered in the first position of the Depth column to edit the retrieval structure.

.I[n] Inserts n lines. If n is not specified, three lines will be inserted. Blank lines will be deleted automatically.

.D Deletes the current line.

Parameters
Depth

Number of times a substructure is executed. See Retrieval Structures can be Executed Recursively.

Enter a leading C or P to determine if the recursive executions are to be applied to objects that are linked as children or as parents.

Level

A retrieval structure is essentially defined by specifying object types on different levels. Object types on lower levels are linked to an object type on the next higher level. In the example below, the object types Interface and File on level 2 are linked to the object type Program on level 1.

Note:
An object type must not occur twice on the same level and refer to the same object type on the next higher level.

Link The type of association defined in a retrieval structure can be determined with link types. The following types are valid and can be applied to various types of objects.
Default link types. These links can be processed using the link editor:
C Children
P Parents
Special link types. These links cannot be processed using the link editor:
M master files
V (direct) views
R real files
F files of a file relation
S file relations of the file
I verifications which are linked to a file via fields (see figure below)
J files which are linked to a verification via fields (see figure below)
K databases in which a storagespace is used
L storagespaces used by database
N dataspaces in which a storagespace is used
O storagespaces used by dataspace
U subcollections of a packagelist
T total collections of a packagelist

Enter an asterisk in any field in this column to display a window with all valid link types.

graphics/retmod8.png

graphics/retmod9.png

Code Type of predefined or user-defined object to be included in the retrieval structure. Enter an asterisk in any field in this column to display a window with all valid object types.

Third Screen - Specifying the Amount of Information and the Layout

This screen is used to specify the information to be displayed on each object and the layout of a report created by the Execute retrieval model function when used with output mode Structured list.

Note:
In batch mode, a line size greater than the maximum line size of 80 characters used in online mode can be defined.

    13:22:47             *****  P R E D I C T  *****                     2007-05-31
                         - Add Retrieval Model Definition -
    Model ........... JP
    Retrieval for ... System
   
    First line information                   General information
      Left ...........(*) L                    Indentation of middle fields .. 2
      First middle ...(*) T offset .. 2        Length of object name ......... 32
      Second middle ..(*) N offset .. 2        Filler character .............. .
      Right ..........(*)
    Second line information
      Left............(*)   offset ..        Linesize ........................ 80
      Middle..........(*)   offset ..        Left margin in batch mode ....... 3
      Right...........(*) C
                                             INDENTATION POSSIBLE UP TO LEVEL 10
    Command ===>
    ------------------ Example ----------------------------------------------------
    01  Program ID .......... Example-Prog1
        :                                          Example abstract program
    02  : File ID ............. Example-File1
        : :                                        Example abstract file
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
           -     -    Canc   -     -     -    Print  -     -    Left  Right Menu

The screen consists of three parts:

  • The top part displays status information.

  • The middle part determines the information to be displayed on each object and the layout of the retrieval model. The parameters that can be specified are described below.

  • The lower part of the screen displays the impact that changes to parameters will have on the layout of a report. The values displayed here (program, file, etc.) are "dummies". They are not derived from actual data stored in Predict.

Specifying the Amount of Information to be Reported on an Object
First /Second line information In reports created by Execute retrieval model, up to seven information categories out of a choice of ten can be displayed on each object, four as first line information (Left, First middle, Second middle, Right) and three as second line information (Left, Middle, Right). If the information that is displayed does not fit into one line, the first and second line information can actually be several lines long.
Left / First middle / Second middle / Middle Right By specifying a code in one of these fields you determine, that information on a specific attribute of an object is to be included in a report and where it is displayed. Possible codes are:
L Level number. The level of the object type in the retrieval structure. The output length is 2.
E External code of the object type (for example FI for Files). The output length is 2.
T Title of the object type. String used in Predict menus and output screens for the respective object type. The output length is 20 (including 3 bytes for the object ID).
S Subtype of the object type (for example Conceptual File). The output length is 17.
N Object name. Object names can be up to 32 characters long. The output length is 34, because two characters are reserved for the optional output of a character marking implemented objects or dummies. The output length can be truncated with the parameter Length of object name (see below).
D Link type. The output length is 1.
A Information contained in the last 32 columns of object lists is included. The layout of object lists is described in the respective sections of the Predefined Object Types in Predict documentation.
K Keywords. The output length is 32.
O Owners. The output length is 32.
C Abstract. The output length is 30.
X Extracts. The output length is 32.
B Association attributes. The output length is 32.
A selection window containing all types of information can be displayed by entering an asterisk (*)
Specifying the Layout
The positions for the display of the various pieces of information are determined as follows:
Left Information displayed Left will always start in the first column if it is displayed online. In batch mode, the left margin can be specified explicitly (see parameter Left margin in batch mode below).
First middle / Second middle / Middle The position of information displayed in a middle field is primarily determined with an offset value (see parameter offset below). The position is indented for lower level objects if a value is specified with the parameter Indentation of middle fields (see below).
Right Information is positioned according to its length starting at the right margin. If, for example, the object name is displayed on the right hand side and its output length (parameter Length of object name) is set to 20, the name is displayed starting in column 60 (79 columns minus the length of the information). This position is calculated only once. Either the first line information or the second line information is used for the calculation, whichever is the longer.
Offset

Distance between the first character of a middle output field and the last character of its preceding field. The last character of the preceding field is determined by the output length of the respective piece of information.

Indentation of middle fields Information on objects that are defined on lower levels of the retrieval structure are indented the given number of columns (optional). The indentation refers to the starting position of the First Middle field (first line information) or the Middle field (second line information).
Length of object name Object names (up to 32 characters) are truncated to the given length (optional).
Filler character

If a value displayed in the field First middle is shorter than the output length of the respective type of information, the remaining space is filled with the character specified. A filler character can only be used if a Second middle field is used. If, for example, a hyphen is specified, the two middle fields are displayed as follows:

File-------------: Example-File1

Linesize In batch mode, the line size can be greater than in online mode. The value of this parameter is compared with the Natural parameter *LINESIZE. If it is less than or equal to *LINESIZE it is used as line size in batch mode; otherwise an error message is displayed.
Left margin in batch mode The left margin can be indented for use in batch mode (optional).
INDENTATION POSSIBLE UP TO LEVEL:

Information on objects that are specified on lower levels in the retrieval model can be indented in reports created by the Execute Retrieval Model function.

How many lower levels can be indented depends on the output length of the different pieces of information and on the values specified with the parameters Offset and Indentation of Middle Fields. The maximum indentation is displayed in this field.

Levels lower than the maximum indentation level are displayed without further indentation.

Saving, Resetting, Quitting the Retrieval Model Administration
Maintaining a retrieval model can be quit with one of the following commands:
SAVE, CAT All changes will be saved.
SAVE R, CAT R Saves all changes without leaving the function.
QUIT, All previous changes to the retrieval model (in all three screens) are lost. A window appears, asking for confirmation of the quit function.
REFRESH Resets all changes of parameters in the third screen without leaving the function. Previous changes to the retrieval structure and the general settings (first screen) remain.

Note:
Before saving the parameters of a retrieval model, Predict checks whether the line size is appropriate for online display. If this is not the case, Predict checks whether the line size is appropriate for batch mode. If so, a message appears indicating that the retrieval model can be used in batch mode only; otherwise, the definition of the retrieval model is rejected.

Copy a Retrieval Model - Code C

A simple method of creating a new retrieval model is to copy an existing model and modify the copy. The model to be copied is identified by its name (Model) and the Object type code.

Display Retrieval Model - Code D

Displays a retrieval model definition in several subsequent screens. For a description of the individual output fields refer to the attribute descriptions in the sections above.

Rename a Retrieval Model - Code N

Retrieval models can be renamed with this function. A second screen is displayed to enter the new name.

Purge a Retrieval Model - Code P

Retrieval models can be purged with this function. Additional confirmation of the purge operation is requested to protect you from purging a retrieval model mistakenly.

Select a Retrieval Model - Code S

Retrieval models can be displayed for selection. The scope of the list can be determined by specifying a model name in asterisk notation and/or by specifying an Object type code.

Cross Reference a Retrieval Model - Code X

Displays a list of all object types, associations and special links that are used by the retrieval model.