This document covers the following topics:
Information on individual Natural members is either retrieved top-down or bottom-up. See also diagrams below. In both cases the retrieval starts with an individual member (program, data area, etc.):
Top-down Retrieval
The functions look for objects that are used by a given member.
For example: The function Program using programs. A program is specified and all programs that are used by this program are shown.
Bottom-up Retrieval
The functions look for objects that use a given member. The notation
referenced in is always used in retrieval functions of this type. For example:
The function Program referenced in programs. A program is specified and all
programs that use this program are listed.
Note:
In the screens Data Areas and Variables and Copy Code only starting
objects in the current library are taken into account.
Top-down retrieval provides answers to question such as these:
Bottom-up retrieval provides answers to question such as these:
Indirect references can be evaluated, for example, "Which programs refer to programs which refer to the program ABC?" Recursion can be extended up to seven levels to show the invocation structure of an application.
When Natural finds in a program a reference to another program, it stores not only the type and name of the program that is used but also how that program is invoked. The following invocation methods are reported by LIST XREF functions:
CALL statements to 3GL programs;
CALLNAT statements;
FETCH statements;
FETCH RETURN statements;
Assignment of a program to a function key (using a SET KEY PFn= statement);
INPUT USING MAP statements;
CALLDBPROC statements to SQL stored procedures;
Function call to Natural Functions;
REINPUT USING HELP statements or an assignment via session parameter HE in an INPUT statement or within a map;
PERFORM statements;
RUN statements;
STACK statements;
CREATE OBJECT statements;
SEND METHOD statements;
Open dialog;
SEND EVENT statements;
Using property;
Method implementation;
Calling an entry in a DBRM (database request module) - only for Natural programs that use static SQL;
Assignment of a program as an error transaction, a startup transaction or a restart transaction:
either by assignment in a Natural program (using a *ERROR-TA= or *STARTUP= statement)
or by definition in Natural Security for a Natural library or a special link to this library, provided that XREF for the application is set to either Y or F in Natural Security and that a user system file has been assigned to the library. These transactions are considered to be invoked by a dummy member *NSC (a program of type P) in the library.
INVESTIGATE statements (invocation of a Natural Expert model).
15:59:18 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Invoked Programs - DBnr: 180 Fnr: 64 Code Function D Count references in program C Count references to program U Program using programs R Program referenced in programs E Program using programs recursively I Program referenced in programs recursively X Xref program using programs Y Xref program referenced in programs Code: ? Save set: N (Y,N) Using program: Program type: (?) Referenced program: Program type: (?) via: (?) Subroutine/Entry/Class/Method/Property/Event: Rec. depth: 7 (1-7) Set number: (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
The functions display active reference information about programs that are invoked from Natural programs. The input screen is displayed with code I in the XRef menu.
Code | Function | Answer to the question | Comments |
---|---|---|---|
D | Count references in program | How many programs does the program ABC refer to? | The total number of referenced programs is displayed and is listed for each invocation method |
C | Count references to program | How many times is the program ABC referred to by programs | The total number of references is listed for each invocation method. |
U | Program using programs | Which programs does the program ABC refer to | The invocation method is indicated. See also Effects of Steplib Support. |
R | Program referenced in programs | Which programs refer to the program ABC | The invocation method is indicated. See also Effects of Steplib Support. |
E | Program using programs recursively | Which programs are referred to by the program ABC, or which programs are referred to by programs which are referred to by the program ABC, .... | The output is structured to show the direct references to programs on the next level. See also Termination of Listing. |
I | Program referenced in programs recursively | Which programs refer to the program ABC, or which programs refer to programs which refer to the program ABC, .... | The output is structured to show the direct references to programs on the next level. See also Termination of Listing. |
X | XREF program using programs | Which programs are referred to by the program ABC, or which programs are referred to by programs which are referred to by the program ABC, .... | The total number of programs at each level is reported as well as the type and ID of each program. This function summarizes the output of the function with code E but omitsthe structural information. |
Y | XREF program referenced in programs | Which programs refer to the program ABC, or which programs refer to programs which refer to the program ABC, .... | The total number of programs at each level is reported as well as the type and ID of each program. This function summarizes the output of the function with code I but omits the structural information. |
In certain circumstances, the listing of a LIST XREF function is terminated and marked as follows:
Recursion is marked with rec and the output is terminated.
The output can be truncated from a level (up to 7) specified by the user. Truncated output is marked with trunc.
The user can specify other parameters that limit the scope of the output, for example programs of a certain type or those with IDs that start with a particular character string. Output terminated in such a manner or due to a reference to a 3GL program is marked with stop.
If a program that has already been displayed in the invocation hierarchy reappears at a lower recursion level, the hierarchy is not displayed again. Instead the program is marked with suppr. (for suppressed).
If the called program is contained in another library, the output is stopped and the program is marked with steplib.
Save set |
Any user defined in Predict can save the types and names of programs listed by functions U, R, X or Y in a set. See Using Sets. Note: |
|
Using program | The meaning of this parameter
depends on the function:
Asterisk notation is possible. Note: |
|
Program type | The type of the Natural program specified as the Using program. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | Main program | |
S | subroutine | |
T | dialog | |
Y | Natural Expert model | |
O | command processor | |
4 | class | |
Referenced program | The meaning of this parameter
depends on the function:
If asterisk notation is used, the function is applied to all programs which meet the given specification. Note: |
|
Program type | The type of the program specified as the Referenced program. See the list of program types above. | |
Via | The method used to invoke programs. Valid values: | |
C | CALL statement | |
CN | CALLNAT statement | |
CP | Command processor | |
CR | CREATE OBJECT | |
F | FETCH statement | |
FR | FETCH RETURN statement | |
H | REINPUT USING HELP statement or HE= assignment | |
I | INVESTIGATE statement | |
IR | Invoke return (stands for all methods that return control to the invoking program: CALL, CALLNAT, FETCH RETURN, Help, INVESTIGATE, Map, PERFORM and Static SQL). | |
K | SET KEY statement | |
M | INPUT USING MAP statement | |
ME | Method implementation | |
O | Open dialog | |
P | PERFORM statement | |
PR | Property | |
R | RUN statement | |
S | STACK statement | |
SE | Send event | |
SM | Send method | |
SQ | Using static SQL | |
T | Assignment to a Natural Security transaction | |
U | Function | |
Subroutine/Entry/Class/ Method/Property/Event: |
One of the following:
This parameter applies when a program is invoked without using its member name. To identify the (non-Natural) program to which an external entry belongs, Predict uses information from Adabas Native SQL or the Predict Preprocessor. To identify the DBRM to which an external entry belongs, Predict uses information created by the function CREATE DBRM of Natural DB2. |
|
Rec. depth | The recursion depth for the functions E, I, X and Y. A number from 1 to 7. | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
Steplib support affects Invoked Programs functions as follows. A distinction is made between Top-down and Bottom-up functions:
Example: Function Program using program
09:50:43 ***** P R E D I C T ***** 2007-05-31 Library: PDLX - Invoked Programs - DBnr: 180 Fnr: 54 Command: PROG * (*) USING PROG * (*) WITH * VIA * Page: 1 T:Program using via ------------------------------------------------------------------------------ 1 P:ZPDFIELD 1 N:N-BUFEDT <<- nfnd Callnat 2 P:ZPDP0 1 P:ZPDP1 Fetch 2 S:ZPDS1 (NEWDICLX,180,54) Perform Function: SUB-IN-ZPDS |
Only programs in the current library that call other programs are displayed.
to 1 | The note <<- nfnd means that the called program was not found within the structure specified. "Not found" in this context means that no XRef data is present. |
to 2 | If the called program is not contained in the current library, Library, DBnr, Fnr are displayed in parentheses. |
Example: Function Programs referenced in programs
09:53:09 ***** P R E D I C T ***** 2007-05-31 Library: PDLX - Invoked Programs - DBnr: 180 Fnr: 54 Command: PROG * (*) REF PROG * (*) WITH * VIA * Page: 1 T:Program referenced in via ------------------------------------------------------------------------------ 1 ?:*DYNAMIC 1 P:ZPDP3 Fetch 2 ?:N-BUFEDT 1 P:ZPDFIELD Callnat 3 M:ZPDM1 1 P:ZPDP1 Map 2 P:ZPDP2 (NEWDIC,180,54) Map 4 P:PGMCO002 (*SYSCOB*,255,255) Entry : PGMCO002 1 P:ZPDP1 Call 2 P:ZPDP2 Call 3 S:ZPDS1 Call |
to 1 | *DYNAMIC produces a list of all programs that call up other
programs by means of variables: ASSIGN #A = 'SUB1' FETCH #A |
to 2 |
The question mark means that the program N-BUFEDT was not found within the specified structure. "Not found" in this context means that no XRef data was found for the program object. The program is, however, referenced by program P:ZPDFIELD via CALLNAT. |
to 3 | Member ZPDM1 was found within the current library.
If the called program is contained in the current library (here ZPDM1), programs not contained in the current library that call this program are also displayed (here ZPDP2 in Library NEWDIC). Library, DBnr, Fnr are displayed in parentheses. |
to 4 | The called program (PGMCO002) was found, but in another library within the structure (library *SYSCOB*). In this case only calling programs within the current library are displayed. |
13:44:35 ***** P R E D I C T ***** 2007-05-31 Library: NEWDICLX - Invoked Programs - DBnr: 180 Fnr: 54 Command: PROG XHMENU10 (*) REF REC * (*) WITH * VIA * Page: 1 DEPTH 7 1 M:XHMENU10 1 ---------2 ---------3 ---------4 ---------5 ---------6 ---------7 --------- P:XPHELP P:XPCIMPL P:XPVERI M:XMCIMP00 P:XPCIMPL <--- rec M:XMREFE00 P:XPREFE P:XPVERI <--- rec P:XPCIMPL <--- rec P:XPCMDP M:XMCIMP00 <--- suppr M:XMCONS00 P:XPVCONS P:XPVERI <--- rec M:XMCOPY00 P:XPCOPY P:XPMENU <--- steplib |
The note <--steplib means that the evaluation was stopped at this point because the called program is contained in another library.
The functions display active reference information about data areas and variables. The input screen is displayed with code D in the XRef menu.
16:25:15 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Data Area and Variables - DBnr: 180 Fnr: 64 Code Function C Count references to variable U Program using variables R Variable referenced in programs D Program using data areas E Data area referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Data area: Data area type: (?) Data block: Structure: Variable: Usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Note:
All functions use objects contained in the current library as
starting objects. In the reports, on the left side only objects in the current
library are listed, regardless of whether or not a library structure was
specified.
Code | Function | Answer to the question... |
---|---|---|
C | Count references to variable | How many times is the variable ABC (contained in the current library) referred to by programs (contained in any library) |
U | Program using variables | Which variables (contained in any library) does the program ABC (contained in the current library) refer to |
R | Variable referenced in programs | Which programs (contained in any library) refer to the variable ABC (contained in the current library) |
D | Program using data areas | Which data areas (contained in any library) does the program ABC (contained in the current library) refer to |
E | Data area referenced in programs | Which programs (contained in any library) refer to the data area ABC (contained in the current library) |
Steplib support affects the above Data Area and Variable functions as follows.
For programs cataloged using Natural 4.1.1 or above on a Windows or UNIX platform or Natural 3.1.2 or above on the mainframe, additional XRef information about each referenced data area is stored: the library name, database number and file number. This information is used to determine the referenced data areas/variables. In addition, the specified library structure is used to determine the data areas/variables that will be used when objects will be cataloged a new.
For programs cataloged using an older version of Natural the additional XRef information is not available, therefore the specified library structure is used to determine the referenced data areas/variables.
Parameters Limiting the Scope of the Functions | ||
---|---|---|
Save set |
Any user defined in Predict can save the types and names of programs listed by functions R or E in one or more sets (one set per library). See Using Sets. Using function D, only types and names of the data areas will be included in the set(s). |
|
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Data area |
The data area or data areas that are used by the program selected above. Asterisk notation is possible. Note: |
|
Data area type | Type of data area used by the program. One of the following three values can be specified: | |
G | Global data area | |
L | Local data area | |
P | Parameter data area | |
Data block | The data block used by the program. | |
Structure | For fields contained in a group,
the group name has to be specified in addition to the field name to ensure
uniqueness. For example, a group is defined as follows:
1 FULL-NAME 2 FIRST-NAME 2 LAST-NAME To identify the variable LAST-NAME, the field name LAST-NAME has to be specified in the field Variable and the group name FULL-NAME has to be specified in the field Structure. |
|
Variable | The variable used by the program.
Note: |
|
Usage | Limits the function to variables that are used in a particular way: | |
M | Modified by the program | |
U | Used but not modified by the program | |
S | Used for dynamic source code creation (see description of the RUN statement in the Natural Statements documentation) | |
If nothing is specified, then all variables are shown. | ||
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The functions display active reference information about views and fields. The input screen is displayed with code V in the XRef menu.
16:47:51 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Views and Fields - DBnr: 180 Fnr: 64 Code Function C Count references to view D Count references to field of view U Program using views R View referenced in programs F Program using fields of views G Field of view referenced in programs A Program using data area views B Data area view referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) View: Data area view: View usage: (?) Field: Field usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Note:
In this section only, the term program applies to global and local
data areas (types G and L) as well as to programs (types H, M, N, P and
S).
Code | Function | Answer to the question... |
---|---|---|
C | Count references to view | How many times is the view ABC referred to by programs |
D | Count references to field of view | How many times is the field ABC referred to by programs |
U | Program using views | Which views does the program ABC refer to |
R | View referenced in programs | Which programs refer to the view ABC |
F | Program using fields of views | Which views does the program ABC refer to, and which fields of these views does it refer to |
G | Field of view referenced in programs | Which programs refer to the field ABC |
A | Program using data area views | Which data area views does program ABC refer to |
B | Data area view referenced in programs | Which programs refer to data area view ABC |
Parameters Limiting the Scope of the Functions | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by functions R, G or B in one or more sets (one set per library). See Using Sets. | |
Program | The ID of the program (or data area) for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program (or data area) for which the function is to be executed. One of the following values can be specified: | |
F | function | |
G | global data area | |
H | help routine | |
K | ISPF Macro | |
L | local data area | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
*, blank | All | |
View | The view (DDMs) that are used by the program (or data area). Asterisk notation is possible. | |
Data area view |
The data area view(s) used by the program or data area. Asterisk notation is possible. Note: |
|
View usage | How the view is used by the program (or data area). One of the following values can be specified: | |
A | Defined in a data area | |
D | Deleted | |
M | Modified (either deleted, updated or stored) | |
N | Stored | |
O | Only read (neither deleted, updated nor stored) | |
P | Database addr. | |
R | Read, deleted or updated | |
T | Coupled search | |
U | Updated | |
*, blank | All | |
Usage A is valid only for data areas. All other values are valid only for programs. | ||
Field | The field or fields used by the program (or data area). Asterisk notation is possible. | |
Field usage | How the field is used by the program (or data area): | |
A | Defined in a data area | |
C | Used as a counter field | |
H | Used in the WITH clause of a search criterion as hyperdescriptor search | |
L | Used in the WITH clause of a search criterion as non descriptor search | |
M | Stored or updated | |
N | Stored | |
O | Either used as a counter field or read (but not modified) | |
R | Updated, used as a counter field or read | |
S | Used in the WITH clause of a search criterion | |
T | Used in the COUPLED clause of a search criterion | |
U | Updated | |
*, blank | All | |
Note: |
||
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The functions display active reference information about Natural copy code (source code). The input screen is displayed with C in the XRef menu.
16:48:49 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Copycode - DBnr: 180 Fnr: 64 Code Function C Count references to copycode U Program using copycodes R Copycode referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Copycode: Usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Note:
All functions use objects contained in the current library as
starting objects. In the reports, on the left side only objects in the current
library are listed, regardless of whether or not a library structure was
specified.
Code | Function | Answer to the question... |
---|---|---|
C | Count references to copy code | How many times is the copy code ABC (contained in the current library) referred to by programs (contained in any library) |
U | Program using copy codes | Which copy codes (contained in any library) does the program ABC (contained in the current library) refer to |
R | Copy code referenced in programs | Which programs (contained in any library) refer to the copy code ABC (contained in the current library) |
Steplib support affects the above Copy Code functions as follows.
For programs cataloged using Natural 4.1.1 or above on a Windows or UNIX platform or Natural 4.1.1 or above on the mainframe, additional XRef information about each referenced copy code is stored: the library name, database number and file number. This information is used to determine the referenced copy codes. In addition, the specified library structure is used to determine the copy codes that will be used when objects will be cataloged a new.
For programs cataloged using an older version of Natural the additional XRef information is not available, therefore the specified library structure is used to determine the referenced copy codes.
Parameters Limiting the Scope of the Functions | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by functions U or R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Copy Code | Only copy code with IDs beginning with a particular sequence of characters is included in the report. | |
Usage | Usage Only copy code that is used by programs in a particular way is included in the report. The following values can be specified: | |
D | Direct use of copy code | |
I | Indirect use of copy code | |
*, blank | Both types of use | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The functions display active reference information about Natural error numbers. The input screen is displayed with code E in the XRef menu.
16:49:37 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Error Numbers - DBnr: 180 Fnr: 64 Code Function C Count references to error number U Program using error numbers R Error number referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Error number: to: Error type: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
C | Count references to error number | How many times is the error number ABC referred to by programs |
U | Program using error numbers | Which error numbers does the program ABC refer to |
R | Error number referenced in programs | Which programs refer to the error number ABC |
Parameters Limiting the Scope of the Functions | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by function R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Error number | Only error messages in the range
of error numbers are included in the report.
Finding error messages that are used dynamically: Error number *DYN as input or output indicates an error number that is used dynamically, as in the following example: VAR1(N4) = 1000 REINPUT WITH TEXT *VAR1 |
|
Error type | Only error messages of the given type are included in the report. The following values can be specified: | |
S | Natural system messages | |
U | Error messages defined in SYSDIC | |
*, blank | Both types | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The functions display active reference information about printers which are assigned in the OUTPUT statement of a DEFINE PRINTER statement. The input screen is displayed with code P in the XRef menu.
16:50:16 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Printers - DBnr: 180 Fnr: 64 Code Function U Program using printers R Printer referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Printer number: to: Printer name: Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
U | Program using printers | Which printers does the program ABC refer to |
R | Printer referenced in programs | Which programs refer to the printer ABC |
Parameters | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by function R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Printer name | Only printers that meet the given name are included in the report. Asterisk notation is possible. | |
Printer number | Only printers with numbers in the specified range are included in the report. | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. |
The functions display active reference information about Natural workfiles. The input screen is displayed with code W in the XRef menu.
16:51:39 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Work Files - DBnr: 180 Fnr: 64 Code Function U Program using work files R Work file referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Work file number: to: Usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
U | Program using workfiles | Which workfiles does the program ABC refer to |
R | Workfile referenced in programs | Which programs refer to the workfile ABC |
Parameters | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by function R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Workfile number | Only workfiles with numbers in the specified range are included in the report. | |
Usage | Only workfiles used in a particular way are included in the report: | |
R | Read (statement READ WORKFILE) | |
W | Write (statement WRITE WORKFILE) | |
D | Define workfile (statement DEFINE WORKFILE), this usage is only applicable in a VAX/VMS environment | |
P | Write PC command (statement WRITE PC FILE n COMMAND) | |
C | Close workfile (statement CLOSE WORKFILE) | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. |
The functions display active reference information about retained sets (as defined in the RETAIN clause of a Natural FIND statement). The input screen is displayed with code S in the XRef menu.
16:52:27 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Retained Sets - DBnr: 180 Fnr: 64 Code Function U Program using retained sets R Retained set referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) Retained set: Usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
U | Program using retained sets | Which retained sets does the program ABC refer to |
R | Retained set referenced in programs | Which programs refer to the retained set ABC |
Parameters | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by function R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
Retained sets |
Only retained sets that meet the given name will be included in the report. Asterisk notation is possible. Note:
Note:
|
|
Usage | Only retained sets used in a particular way are included in the report: | |
B | Sets built by FIND ... WITH ... RETAIN AS 'SET' statements. | |
R | Sets released by RELEASE SET 'SET' or RELEASE SETS statements. | |
U | Sets used by FIND ... WITH 'SET' statements. | |
*, blank | All | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. |
The functions display active reference information about processing rules. The input screen is displayed with code R in the XRef menu.
16:53:11 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Processing Rules - DBnr: 180 Fnr: 64 Code Function C Count references to rule U Map using rules R Rule referenced in maps Code: ? Save set: N (Y,N) Map: Rule: Rule status: (?) Rule usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
C | Count references to rule | How many times is the rule ABC referred to by cataloged maps |
U | Map using rules | Which rule does the cataloged map ABC refer to |
R | Rule referenced in maps | Which cataloged maps refer to the rule ABC |
Parameters | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of maps listed by function R in one or more sets. See Using Sets. | |
Map | The ID of the map for which the function is to be executed. Asterisk notation is possible. | |
Rule | The ID of the rule for which the function is to be executed. Asterisk notation is possible. | |
Rule status | Only rules of the given type are included in the report: | |
A | Automatic rules | |
F | Free rules | |
*, blank | All | |
Usage of rule | Only rules that are used in the given way are included in the report: | |
A | Used as automatic rule | |
F | Used as free rule | |
I | Used as inline rule | |
*, blank | All | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The functions display active reference information about External resources.
Note:
In Predict, the term "External resource"
refers to the Natural object type "Resource".
Further information on this object type can be found in the section
Ressource of Objects for Natural Application Management in the Natural
Programming Guide.
The input screen is displayed with code F in the XRef menu.
16:53:50 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - External Resources - DBnr: 180 Fnr: 64 Code Function C Count references to External resources U Program using External resources R External resources referenced in programs Code: ? Save set: N (Y,N) Program: Program type: (?) External resource: Usage: (?) Set number: 1 (?) Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Code | Function | Answer to the question... |
---|---|---|
C | Count references to External resources | How many times is the External resource ABC referred to by programs |
U | Program using External resources | Which External resources does the program ABC refer to |
R | External resources referenced in programs | Which programs refer to the External resource ABC |
Parameters | ||
---|---|---|
Save set | Any user defined in Predict can save the types and names of programs listed by functions U or R in one or more sets. See Using Sets. | |
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
F | function | |
H | help routine | |
K | ISPF Macro | |
M | map | |
N | subprogram | |
P | main program | |
S | subroutine | |
T | dialog | |
4 | class | |
*, blank | All | |
External resource | Only External resources with IDs beginning with a particular sequence of characters are included in the report. | |
Usage | Only External resources which are used in a particular way are included in the report. | |
B | Sets built by FIND ... WITH ... RETAIN AS 'SET' statements. | |
R | Sets released by RELEASE SET 'SET' or RELEASE SETS statements. | |
U | Sets used by FIND ... WITH 'SET' statements. | |
*, blank | All | |
Set number | If a set number is specified, XRef data is only evaluated for those objects defined in the given set. All other search criteria are then ignored. Set numbers can not be used as input for Count functions. |
The function Report programs with xref data displays summary active reference information about programs. The input screen is displayed with code X in the XRef menu.
16:54:30 ***** P R E D I C T ***** 2009-09-02 Library: SYSDIC - Report Program - DBnr: 180 Fnr: 64 Program: ________ (?) Program type: _ (?) User Id: ________ Terminal Id: ________ from date: __________ to date: 2009-09-02 short list: N (Y,N) save set: N (Y,N) Set number: 1 (?) Report Nr Report Nr Statistical data 1 Predict description 2 Natural program list 3 Using/Referenced programs 4 Views, Da-views and fields 5 Da-areas and variables 6 Workfiles, printers, errors... 7 format extended description N expand copycodes / rules N suppress empty reports Y Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit |
Up to seven types of information can be retrieved:
Information Reported by Report Program with XRef Data | |
---|---|
Statistical data | The program ID, the program type, the date and time when it was cataloged, the ID of the user who cataloged it, the ID of the terminal where it was cataloged and the information that would be displayed for this program by the Natural command LIST DIR object-ID. |
Predict description | The extended description and abstract that are stored in the Predict object for that program. If Format extended description is set to Y, Con-form, Software AG's text formatting facility, is used whenever a description is output. See Extended Description Skeleton in the section Defaults in the Predict Administration documentation. |
Natural program list | A Source code listing of the Natural program itself. If Expand copycodes / rules is set to Y, all copy code used by an INCLUDE statement is expanded in the listing of the program and all processing rules (free and automatic) used in a map are expanded in the listing of the map. |
Using/referenced programs | For each program that either invokes that program or is invoked
by that program, the program type, the program ID, the method of invoking and -
for maps - the processing rules used are included in the report.
Note: |
Views, Da-views and fields | Each view, data area view and field of a view used by that program is included in the report. |
Da-areas and variables | Each data area and each variable used by that program is included in the report. |
Workfiles, printers, errors | Natural workfiles, retained sets, copy code, printers and error message numbers used by that program are included in the report. |
Parameters | ||
---|---|---|
All parameters except Save set limit the scope of the function. |
||
Program | The ID of the program for which the function is to be executed. Asterisk notation is possible. | |
Program type | The type of Natural program for which the function is to be executed. One of the following values can be specified: | |
A | parameter data area | |
G | global data area | |
F | function | |
H | help routine | |
K | ISPF Macro | |
L | local data area | |
M | map | |
N | subprogram | |
O | command processor | |
P | main program | |
S | subroutine | |
T | dialog | |
Y | Natural Expert model | |
4 | class | |
*, blank | all | |
User ID | Only those programs cataloged by the specified user will be processed. Asterisk notation is possible. | |
Terminal ID | Only those programs cataloged from the specified terminal are processed. Asterisk notation is possible. | |
From date ... to date | Only those programs cataloged within the range of dates specified are processed. | |
Short list | Y | Displays the following information for each program selected in
a single line:
- Program ID |
N | A more extensive report is created, containing up to seven categories of information. Enter digits in the Nr column to determine the sequence of the information displayed. Enter 0 to suppress categories that are not to appear. | |
Save set | Any user defined in Predict can save the types and names of listed programs in a set. This feature is normally used together with the Short list option. See Using Sets. | |
Format extended description | Y | Any Con-form instructions contained in the extended description of any object are executed. See Extended Description Skeleton in the section Defaults in the Predict administration documentation. |
Expand Copy Codes/Rules | Y | All copy code used by an INCLUDE statement is expanded in the listing of the program and all processing rules (free and automatic) used in a map are expanded in the listing of the map. |
Suppress empty reports | Y | Suppress reports where no information is found in a particular category. |
The following sample output of function Report Programs with XRef data shows how features of NaturalX are documented in Predict.
*** Report for program references *** 4:CLASS1 class name NATURAL.BEAR interface SOUND method 1 SNIFF impl. SNIFF-N property 1 NATURALBEARPROPERTY interface IMOVE method 1 WALK impl. WALK-N *** Report for data areas, blocks and variables *** 4:CLASS1 using data area 1 L:GUID-L variables 1 INTERFACESOUNDGUID Used 2 NATURALBEARGUID Used data area 2 L:BEAR-O as object data area variables 1 BEAR-PROPERTY-VARIABLE Used data area 3 P:SNIFF-A data area 4 P:WALK-A |