Standard maintenance functions are described in the section Maintenance in Predict in the Predict Reference documentation.
This document covers the following topics:
To edit the lists of entry points, programs and files linked to a program, call the object list editor using one of the following methods:
Enter Y in the field Associations at the bottom of the Add, Copy or Modify program screens and select Uses PR concept./Uses FI concept.. An asterisk before one of these fields indicates that the program already contains a list of programs or files for the association.
Call the function Edit entry points or Link children in the Program Maintenance menu (codes R and L).
Enter command EDIT PROGRAM ENTRY <program
ID>
or LINK
CHILDREN
.
The table below lists the program types permitted for a program written in a particular language and indicates whether the program can have a list of entry points. In third generation languages, marked * in the table below, functions and subprograms can be documented as programs of type F and N respectively, but any active references for these programs will have type P (main program). The active references of these programs will be correctly connected in the active retrieval functions to programs of types P, N and F.
Language | Permitted Program Types | Entry Points allowed? | |
---|---|---|---|
B | BAL (Assembler)* | C D F I N P U | yes |
C | COBOL* | C D F I N P U | yes |
E | Natural EL | D Y | no |
F | FORTRAN* | C D F I N P | yes |
G | ADA* | C D F N P | yes |
H | C* | C D F I N P U | yes |
J | Job Control Language | D J | no |
N | Natural | A C D G H I K L M N O P S T X 1 4 5 | no |
O | Other | C D F H M N P | yes |
R | Rexx | R | yes |
P | PL/I* | C D F I N P U | yes |
Q | Static SQL | D I P | yes |
S | SQL procedure language | R U | no |
V | Java | R | yes |
Z | System program | D E | yes |
0 - 9 | user-defined | C D F N P | no |
New languages (code 0 - 9) are defined with the program U-PGMLAN. See the section U-PGMLAN - Define New Program Language in the section User Exits in the Predict Administration documentation.
If the same member is used in several libraries, multiple documentation of this member can be avoided by omitting parts of the implementation pointer. Predict then finds out for itself all the libraries in which this member exists. In the example below, the library name is omitted.
The valid combinations of implementation pointer parameters permitted for Natural programs are shown below.
Member | Y | Y | Y | Y |
Library | Y | Y | Y | |
Fnr | Y | Y | ||
DBnr | Y |
The following commands are available when editing one of the following lists:
Uses FI conceptually
Entry point list
Uses PR conceptually
Insert information from XRef data into the object list. Mark objects that are used with <active, and mark objects that are not used with <unused. XRef data without a corresponding documentation object is marked *NOT DOCUMENTED*. An object ID can then be entered and the .E command can be used to create a Predict object corresponding to the XRef data. The implementation pointer for the new object is derived from XRef data and automatically inserted into the input fields of the Add menu.
Update active reference data in the object list. Mark used objects with <active and delete unused objects from the list. Comments on the ACTIVE command (above) also apply to this command.
Switches back to normal edit mode after ACTIVE or UPDATE have been issued. Information displayed in the right column is no longer derived from XRef data but is taken from the Predict objects. All lines marked *NOT DOCUMENTED* are removed from the list. X and Y marks and scan values specified with the SCAN command are reset (as with the RESET command in any other list editor).
A Natural for DB2 database request module (DBRM) can be generated by the function CREATE DBRM of Natural DB2 from the list of entry points in a Predict object for a program of language Q (static SQL). See the section DB2 and SQL/DS in the Predict and Other Systems documentation.
Each entry point must be a Natural program that uses this DBRM. The Predict object should specify the member where the function GENERATE DBRM is to store the DBRM. The table below lists the columns of information that can be stored about entry points for a program of language Q only.
Column | Meaning |
---|---|
NAT-lib | The name of the library in which the Natural program is stored. |
NAT-pgm | The name of the member in which the Natural program is stored. |
Typ | The subtype of the Predict object for the Natural program. |
Documentation | The ID of the Predict object for the Natural program. |
The name of each entry point is concatenated. For detailed information on how the name is created, see the section Static SQL in the Predict and Other Systems documentation. This name is used for the entry point when displaying the DBRM's Predict definition (retrieval function) or its active references (LIST XREF command).
For any type of program except Q, the names of the entry points are stored in a single column. The editor commands ACTIVE and UPDATE can be used to insert active reference data into an entry point list.
The following rules apply:
A program cannot be purged if it is linked to packagelist.
If a program is implemented, a message tells you that XRef data will be deleted, too.
Creates Predict documentation objects for implemented programs (members). The function is used when redocumenting applications.
Predict retrieves the information needed to create the documentation object for a member either by scanning source code (only for Natural programs) or by evaluating XRef data.
Redocument functions are executed in two steps:
Select the programs to be processed using the parameters in the first Redocument Program screen as selection criteria. See Selecting Programs to be Redocumented.
Determine the scope of the redocumentation using parameters in the second Redocument Program screen. See Specifying the Redocument Parameters.
The function Redocument program is one of the few maintenance commands
that can be entered in batch mode. The additional parameters that can be
specified and a sample REDOCUMENT
command are given
in the section Predict in
Batch Mode in the Predict
Administration documentation.
Under Natural Security, some restrictions apply to this function to prevent unauthorized access to Natural sources. The same logic is used as in the SYSMAIN utility to check the user's access rights. The switch SYSMAIN from Natural Security is also interpreted in the Redocument program function.
See section SYSMAIN under Natural Security in the Natural Security documentation for more information.
Enter code X in the Program Maintenance menu to display the Redocument Program screen:
13:25:12 ***** P R E D I C T ***** 2007-05-31 Plan 0 - Redocument program - Member ........... File number ....... 54 Library .......... Database number ... 180 Language ........* N Natural Password .......... Source/XRef ...... S (S/X) Source Cipher ............ Member types ....* All |
Parameters | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Member name | Name of the member to be redocumented. Asterisk notation can be used. | ||||||||||||||||||||
Library | Depending on the parameter Source/XRef, either
|
||||||||||||||||||||
Language |
|
||||||||||||||||||||
Source/XRef |
|
||||||||||||||||||||
Member type |
Additional selection criterion. Only member of the given
types will be redocumented. See Program
Types for a list of types that can be specified. |
||||||||||||||||||||
File number, Database number | Specify the FUSER file where the members to be processed are stored. Only applicable if Source/XRef is set to S. | ||||||||||||||||||||
Password, Cipher | Password and cipher code defined in Adabas can be specified if required. Only applicable if Source/XRef is set to S. |
The following screen appears if language type N is entered in the Redocument Program menu.
13:13:28 ***** P R E D I C T ***** 2007-05-31 Plan 0 - Redocument program - Processing options Processing option ..........* L List only Link to system .............. GER-SY Library structure ..........* Naming options (only applicable if 'Processing option' is 'Add') Program ID prefix ........... Lib.name as sec.prefix ...... Y (Y,N) Contents of documentation Implementation pointer Abstract ...................* S Statistics Library .. Y (Y/N) Description ................* B Header comment Fnr ...... Y (Y/N) Replace/append description .. R (R/A) DBnr ..... Y (Y/N) Program list ...............* U Update File list ..................* U Update Default owner ............... First default keyword ....... Second default keyword ...... 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 |
All parameters of the Redocument function can be set to default values by the data dictionary administrator in the Redocumentation Using Source Code screen, which is called by code R in the Modify General Defaults menu. Individual input fields can be protected. Protected default values cannot be overwritten. Protected fields are skipped when positioning the cursor with TAB.
Note:
Depending on the parameter Source/XRef (see table above), some
parameters may not be contained in the screen. This is stated in the
description of parameters below.
Parameters | |||||||||
---|---|---|---|---|---|---|---|---|---|
Processing option |
|
||||||||
Link to system | If Processing option is set to Add or Replace,
the program objects created by the function are automatically linked as
children to the specified System. If no system is specified, Predict looks for a documentation object of type system with the given Library, DBnr and Fnr. The system object that meets most of these criteria is inserted in this input field. |
||||||||
Library structure | You can specify a library structure that is used to determine the used programs. If no structure is specified, evaluation is performed without a library structure. |
Only applicable if Processing option=Add.
The ID of the program object created by the redocument function contains up to three parts, separated by hyphens.
Parameters | |
---|---|
Program ID prefix | A prefix that can be specified with the parameter Program ID prefix. |
Lib.name as sec.prefix | The library name of the member as secondary prefix, if the parameter Lib.name as sec.prefix is set to Y. |
- | The third part is the name of the member. |
These parameters determine the information to be documented.
Parameters | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Abstract |
|
||||||||||||
Description |
|
||||||||||||
Replace/append descr. |
|
||||||||||||
Program list |
|
||||||||||||
File list | Files that are used by a program can be included in the file list Uses FI concept. of the program. See Program list above for description of the options. | ||||||||||||
Default owner | The default Owner specified is included in the owner list of the object. The Owner must be defined in at least one object of type user. Only applicable if Processing option is set to A. | ||||||||||||
First default keyword | Only applicable if Processing option is set to A. | ||||||||||||
Second default keyword | Two keywords can be specified that are linked to the objects created. The keywords must be defined in Predict. | ||||||||||||
Implementation pointer: Library, DBnr, Fnr |
These parameters determine two things:
Note: |
||||||||||||
Handle /* in columns 1+2 as comment or as remark |
|
This function can only be executed for programs of type SQL procedure or Database function with language SQL procedure.
The Predict Description Editor is called. Additional checks are performed when the procedure code is cataloged. See the section Editors in Predict in the Predict Reference documentation for more information.