Program

#### Search Results

Search

# Program

This document covers the following topics:

- Program Maintenance

- Program Retrieval

- Program Active Retrieval

## Program Maintenance

The Program Maintenance Menu is called with the command `MAINTAIN PROGRAM`.

### Overview of Functions and Commands

Function | Code | Command
--- | --- | ---
Add a program | A | ADD PROGRAM
Copy program | C | COPY PROGRAM
Modify program | M | MODIFY PROGRAM
Rename program | N | RENAME PROGRAM
Purge program | P | PURGE PROGRAM
Edit description | W | EDIT PROGRAM DESCRIPTION
Display program | D | DISPLAY PROGRAM
Link children | L | LINK PROGRAM <active-association-type>
Edit owners of a program | O | EDIT PROGRAM OWNER
Edit entry-points | R | EDIT PROGRAM ENTRY
Select program | S | SELECT PROGRAM
Redocument program | X | REDOCUMENT PROGRAM
Edit procedure code of a program | Y | EDIT PROGRAM PROCEDURE

### Parameters

Keyword | Field | Position
--- | --- | ---
ID | Program ID | 1
<> | Copy ID | 2

### Program-specific Maintenance Commands

See also Standard Maintenance Commands.

Command | Description
--- | ---
EDIT PROGRAM ENTRY<Program-ID> | Use this command to edit entry points of a program directly.
EDIT PROGRAM PROCEDURE<Program-ID> | Use this command to edit the procedure code of a program directly.
REDOCUMENT PROGRAM<Member><Library> |
MEM | Member | 1
LIB | Library | 2

### Redocumenting Programs in Batch Mode

This is one of the few maintenance commands that can be used in batch mode. The following parameters are only available in batch mode and cannot be used online.

Keyword | Field | Position
--- | --- | ---
MEMBER | Member | 1
LIBRARY | Library | 2
LANGUAGE | Language | 3
SOURCE | Source/XRef | 4
MEMBER-TYPE | Member types | 5
DBNR | Database number | 6
FNR | File number | 7
PSW | Password | 8
CIPHER | Cipher | 9
PROCESS-OPT | Processing option | 10
SYSTEM | Link to system | 11
PREFIX | Program ID prefix | 12
LIBRARY-PREFIX | Lib.name as sec.prefix | 13
COMMENTS | Abstract | 14
DESCRIPTION | Description | 15
DESC-OPT | Replace/append descript. | 16
PROGRAM-LIST | Program list | 17
FILE-LIST | File list | 18
DEFAULT-OWNER | Default owner | 19
DEFAULT-KEY1 | First default keyword | 20
DEFAULT-KEY2 | Second default keyword | 21
Implementation Pointer
POINTER-LIB | Library | 22
POINTER-FNR | Fnr | 23
POINTER-DBNR | DBnr | 24
ABSTRACT | Abstract | 25
STRUCTURE | Library structure | 26

### Example

Batch command to document all programs in library TESTLIB in Adabas file 8, database 1:

REDOCUMENT PROGRAM LIBRARY=TESTLIB,FNR=8,DBNR=1,PROCESS-OPT=A

or

REDOCUMENT PROGRAM ,TESTLIB,8,1,,A

This example uses the Natural parameters IA==, ID=,

## Program Retrieval

The Program Retrieval Menu is called with the command `RETRIEVE PROGRAM`.

### Overview of Functions and Commands

Retrieval Type | Code | Default Output Mode | Command
--- | --- | --- | ---
Programs | D | D | DISPLAY PROGRAM
L | LIST PROGRAM
S | SELECT PROGRAM
D | SHOW PROGRAM
Execute retrieval models | E | T | EXECMODEL PROGRAM
Dummy/Placeholder program | C | L | DUMMY PROGRAM <passive-association-type>
Programs with parents | B | D | PARENTS PROGRAM <passive-association-type>
Programs with no parents | O | L | FREE PROGRAM ANY | ALL | <passive-association-type>
Programs with children | T | D | CHILDREN PROGRAM <active-association-type>
Programs with no child | U | L | EMPTY PROGRAM ANY | ALL | <active-association-type>

### Parameters

Keyword | Field | Position
--- | --- | ---
ID | Program ID | 1
PARENT | Contained in SY | 2
MEM | Member | 3
LIB | Library | 4
RES | Restrictions | 5
OUT | Output options | 6
TYPE | Program of type | 7
LANGUAGE | Language | 8
FNR | User system Fnr | 9
DBNR | User system DBnr | 10
MODEL | Model | 11
MODE | Output mode | 12

### Program-specific Retrieval Commands

Program objects are processed with Standard Retrieval Commands.

## Program Active Retrieval

The Program Active Retrieval Menu is called with the command `ACTIVE PROGRAM`.

### Overview of Functions and Commands

Retrieval Type | Code | Default Output Mode | Command
--- | --- | --- | ---
Programs |  |  | see Retrieval
Entries ref. by members | R | L | REFERENCED PROGRAM
C | COUNT PROGRAM
Entries not referenced | U | L | UNUSED PROGRAM
Programs not implemented | N | L | Note:XIST PROGRAM
Programs using programs | P | L | USING PROGRAM
Programs using files | F | L | USING FILE

### Parameters

Keyword | Field | Position
--- | --- | ---
ID | Program ID | 1
PARENT | Contained in SY | 2
MEM | Member | 3
LIB | Library | 4
ENTRY | Entry | 5
RES | Restrictions | 6
OUT | Output options | 7
TYPE | Programs of type | 8
LANGUAGE | Language | 9
FNR | User system Fnr | 10
DBNR | User system DBnr | 11
SET | Save set | 12
LIB-STRUCTURE | Library structure | 13
MODE | Output mode | not possible

### Program-specific Active Retrieval Commands

Retrieval Command | Description
--- | ---
REFERENCED PROGRAM | Lists the members that reference the specified entry points of the documented programs.
COUNT PROGRAM | 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.
UNUSED PROGRAM | Lists entry points not referenced by any member.
Note:XIST PROGRAM | Lists programs that are defined in Predict but do not correspond to members actually implemented.
USING FILE | Lists programs with Files which are linked or used according to XRef data.
USING PROGRAM | Lists programs with Programs which are linked or used according to XRef data.

### On this page

- Program Maintenance
- Program Retrieval
- Program Active Retrieval