This document covers the following topics:
The Program Active Retrieval screen is displayed with function code A and object code PR in a main menu or the command ACTIVE PROGRAM.
13:06:33 ***** P R E D I C T ***** 2007-05-31 Plan 3 - (PR) Program Active Retrieval - Profile HNO Retrieval type Retrieval type D Programs N Programs not implemented R Entries referenced by members P Programs using programs U Entries not referenced F Programs using files Retrieval type .... Output mode ......* Program ID ........ Programs of type .* in system ......... Language .........* Member ............ User system Fnr ... Library ........... User system DBnr .. Library structure * Entry ............. Restrictions .....* Profile HNO,used Output options ...* Profile HNO Save set .......... N (Y/N) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Next Stop Last LnkEl Flip Print Impl AdmFi SelFi Prof Main |
Program Active Retrieval functions retrieve information from Predict program objects and from XRef data for the following types of objects:
Natural objects cataloged with with XREF set to Y.
3GL programs processed by the Predict Preprocessor or Adabas Native SQL
DB2 database request modules generated with the Natural for DB2 function Create DBRM with the active reference option switched on.
Retrieval types Entries referenced by members and Entries not referenced only apply to 3GL programs.
An active retrieval operation consists of a retrieval type and an output mode. The retrieval types are described in more detail below. The output mode determines how the results are presented. Not all output modes are valid for all retrieval types. See table below.
Retrieval Type | Code | Output Mode | Save Set | |||
---|---|---|---|---|---|---|
select | list | disp | count | |||
Programs | D | X | X | X | ||
Entries referenced by members | R | X | X | X | X | |
Entries not referenced | U | X | X | |||
Programs not implemented | N | X | X | |||
Programs using programs | P | X | X | |||
Programs using files | F | X | X |
The results of retrieval type R can be saved in sets and processed with the Natural command LIST XREF.
Parameter | Description |
---|---|
Program ID | Restricts operation to program with ID specified. Use asterisk notation to specify a range. |
Programs of type | Restricts operation to programs of type specified. Enter asterisk for possible values. Enter blank for all program types. |
in system | Restricts operation to programs in system specified. Use asterisk notation to specify a range. |
Language | Restricts the operation to programs with the language
specified. Enter blank for all program languages. This parameter specifies the language of the caller program. |
Member, Library, User system Fnr/DBnr | Limits the function to Programs with the implementation pointer specified. For Member and Library you can enter a range of values using asterisk notation. |
Library structure | This parameter is only evaluated for the function
Programs using
programs. Only Programs which have the same implementation pointer
as one of the Systems in the Library Structure and have linked children of type
Program are evaluated.
If you do not enter a Library Structure, the programs are evaluated as in earlier versions of Predict without steplib logic. If you do enter a Library Structure, it must be fully qualified. If you use asterisk notation and only one Library Structure falls within the range specified, this is taken. Otherwise a window appears in which you can select a Library Structure from a list. The implementation pointer of the first System in the Library Structure - the main library - must be complete (parameters Library, Fnr, DBnr). If this is not the case, a window appears in which you must specify the missing parameters. See the section Steplib Support in the Predict and Other Systems documentation. |
Entry | Restricts the operation to programs with the entry points specified. Not applicable to active retrieval types D and N. |
Restrictions | The scope of the function can be limited by Restrictions.
Restrictions can be specified temporarily with code T in this field or taken
from a profile. See Using Restrictions
and Output Options from Profiles Restrictions apply only to Predict objects. They cannot be applied to libraries, for example. |
Output options | Output options determine the amount of information contained in a report. Output options can be specified temporarily with code T in the field Output options or taken from a profile. Enter asterisk for valid values or see Output Options for more information. Not applicable to active retrieval types D and N. |
Provides information on programs by invoking the retrieval type of same name. Output mode D, L or S must be specified:
Output Mode | Description |
---|---|
D | Displays programs with attributes, implementation pointers,
entry points and user exits. Command: DISPLAY PROGRAM |
L | Shows a single-line list of programs with some main
attributes. Command: LIST PROGRAM |
S | Displays list of programs from which entries can be selected
for further processing or commands added to the workplan. Enter an asterisk in
field Cmd for list of possible functions. Command: SELECT
PROGRAM .
|
Provides information on members which refer to the specified entries. Output mode L, S or C must be specified:
Output Mode | Description |
---|---|
L | Lists the members which refer to the specified entries. Command: REFERENCED PROGRAM |
S | Produces list of programs with their entries from which programs can be selected for further processing or commands added to the workplan. |
C | Lists the libraries which use the specified entries and
indicates the number of references per library and, if the entry is used in
more than one library, the total number for all libraries. Command: COUNT PROGRAM |
Provides for each member (implemented program) the entry points that are not referenced by any other member. Output mode L or S must be specified:
Output Mode | Description |
---|---|
L | Lists entry points not referenced by any other member. Command: UNUSED PROGRAM |
S | Produces a list as above from which entries can be selected for further processing. |
Provides information on programs that are defined in Predict but do not correspond to members actually implemented. Output mode L or S must be specified:
Output Mode | Description |
---|---|
L | Lists programs that are defined in Predict but have no
corresponding implemented member. Command: Note: XIST PROGRAM |
S | Produces a list as above from which programs can be selected for further processing or commands be added to the workplan. |
Lists programs with referenced programs. For each program all linked programs and all programs which are used according to XRef data are listed. Output mode L or D must be specified
Output Mode | Description |
---|---|
L | Name, type and implementation pointer of the using program and
at least one line for each used program is displayed, depending on the output
options specified. Command: USING PROGRAM |
D | Equal to "L" but more information about the using program is displayed. |
The diagrams below show the possible types of data used to document programs/members and relationships of programs/members in Predict. The four boxes represent the status information on referenced programs in columns L, D, I and U of the output list of this function. If information in any of the four boxes or information represented by the arrows is missing, this indicates that the implementation or the documentation of an application is incomplete.
Note:
In the following description, the term program object is used for
a Predict object of type program, whereas the term member identifies an
implemented program/subroutine for which XRef data exists.
The evaluation of documentation and XRef data is different for related programs of type program and related programs of type subroutine. 3GL programs are treated as subroutines, where Predict scans for the entry points.
13:18:23 ***** P R E D I C T ***** 2007-05-31 - List Program using Programs - Page: 1 Program ID ......... * #MAP1___SU-XREF_0094100010 Type ............... Map / Helpmap ------------------------------------------------------------------------------- Implementation Member .. 'MAP1 Library .. SU-XREF Fnr .. 941 DBnr .. 10 Cnt Uses PR concept. Ty Member Library Fnr DBnr L D I U 1 #HELP___SU-XREF_0094100010 H #HELP SU-XREF 941 10 D I U 2 #INCLUDESU-XREF_0094100010 C #INCLUDE SU-XREF 941 10 D I U 3 #LDA____SU-XREF_0094100010 L #LDA SU-XREF 941 10 D I U |
For a description of all other columns, see the section Layout of Program Lists in the Predefined Object Types in Predict documentation.
Parameter | Description |
---|---|
L (linked) | An association to the related Program ID exists. If L is displayed and D is not, the child object is a dummy (related Program ID is in the program list but not documented with a documentation object). In the example above, the objects YSHLP3 and YSHLP4 are dummies. |
D (documented) | A Predict program object for related Program ID exists. |
I (implemented) | Related Program ID is implemented. Predict evaluates XRef data to determine whether an object is implemented. It is therefore possible that a related Program ID that is not (yet) documented appears in the list and is indicated as implemented. In the example above, SYSHLP7 and SYSHLP8 are implemented but not documented. |
U (used) | The related Program ID object is used by an implemented
member. Predict evaluates XRef data and identifies objects as used if a FETCH
or PERFORM statement is issued for them. Hence, a member that appears with a related Program ID in the list does not necessarily have to be implemented. In the example above, TSH-SYSHLP5 is used but not implemented. |
The table below describes actions to restore consistency between documentation and implementation depending on the current status of the objects/members indicated with related program ID in a List Program with programs list.
Combination of | Recommended Actions to Restore Consistency | |||
---|---|---|---|---|
L | D | I | U | |
L | D | I | U | No action necessary. The related program Program ID is linked, documented, implemented and used. |
L | D | I | - | Use the member or purge the link and the program object in the Predict documentation. |
L | D | - | - | Implement and use a member as defined in the Predict documentation or purge the association and the program object in the Predict documentation. |
L | D | - | U | Implement the related Program ID or purge the link and the program object in the Predict documentation and remove the corresponding FETCH statement from the member. |
- | D | I | U | Link the related program object Program ID to the program object in the Predict documentation. |
- | D | - | U | Link the related Program ID to the program object in the Predict documentation and implement the member. |
- | - | I | U | Document the related Program ID and link it to the program object in the Predict documentation. |
- | - | - | U | Implement the related Program ID, document it in Predict and link it to the program object or remove FETCH statement from member. |
L | - | - | - | Document, implement and use the program or purge the link in the Predict documentation. |
If the related program is a subroutine or a 3GL program, one of two additional remarks may be displayed if the L/D/I/U combination is not sufficient to express the actual status of the related (sub)program.
Note:
For a description of all other possible L D I U combinations refer
to the table in the section Evaluating Links to Programs
above.
Combination of | With Remark | Recommended Actions to Restore Consistency | |||
---|---|---|---|---|---|
L | D | I | U | ||
L | D | I | U | Entry not in Docu (see diagram 1 below) |
The related program object Program ID (type subroutine) is
correctly linked to the program object, but the XRef data for the corresponding
members indicates that - MEMBER1 does not call a function / 3 GL program as documented in the Predict object PROG2 and - MEMBER2 does not contain a function as documented in the Predict object PROG2. |
L | D | I | U | Entry not impl (see diagram 2 below) |
The related program object Program ID (type subroutine or
program with language set to a 3GL language) is correctly linked to the program
object, but the XRef data for the corresponding members indicates that - MEMBER2 does not contain a function / 3GL entry point that is documented in the Predict program object PROG2, but - MEMBER1 calls a function / entry point as documented. |
The diagram below illustrates the status indicated with L D I U Entry ... not in Docu.
The diagram below illustrates the status indicated with L D I U Entry ... not in Impl.
Lists programs and files which are linked as children or which, according to XRef data, are used by the programs. Information is displayed for each file about whether it is linked, documented, implemented or used. Output mode L or D must be specified.
Output Mode | Description |
---|---|
L | For each program, the name, type, implementation pointer and
some more attributes are given. At least one line for each file is displayed,
depending on the output options specified. Command: USING FILE |
D | As above, but more detailed information about the program is given. |