Extract Program Information (EXTPGMINF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Extract Program Information (EXTPGMINF) command extracts external linkage information from extended program model (EPM) program objects, and stores this information in a library information file. External linkage information, which includes external variables and entry points, can only be extracted from EPM program objects. The C/400*, FORTRAN/400*, and Pascal compilers produce EPM program objects.

A library information file is a collection of the linkage information for a set of related programs. The library information file name is used on the LIBFILE parameter of the SETPGMINF command. For example, a library information file is provided for the set of programs that make up the C/400 run-time library.

The EXTPGMINF command lets you create a file to store the names of all the affected entry points in your application, instead of specifying each program object name on the SUBPGM parameter of the SETPGMINF command.

Error messages for EXTPGMINF

None

Top

Parameters

Keyword Description Choices Notes
PGM Program Qualified object name Required, Positional 1
Qualifier 1: Program Generic name, name, *ALL
Qualifier 2: Library Name, *LIBL, *USRLIBL, *CURLIB
FILE File to receive information Qualified object name Required, Positional 2
Qualifier 1: File to receive information Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OPTION Extract record options *REPLACE, *DELETE, *UPDATE Optional, Positional 3
CRTFILE Create the file *NO, *YES Optional
RECLIB Library name to record Name, *LIBL, *FOUND Optional
CHECK Consistency Check *ALL, *ENTRY, *DATA, *NONE Optional
Top

Program (PGM)

The PGM parameter specifies the name of the program and library that contains the linkage information you want to extract. This is a required parameter.

program-name
Enter the name of a program that contains the linkage information you want to extract.
generic*
Enter a generic name for the programs that contain the linkage information you want to extract.
*ALL
Linkage information is extracted from all the programs that exist in the library.

The possible library values are:

*LIBL
The system searches the library list. You cannot specify *LIBL if you specify CRTFILE (*YES).
*USRLIBL
The system searches the user portion of the library list.
*CURLIB
The name of the current library is used. If you have not specified the current library, QGPL is used.
Top

File to receive information (FILE)

Specifies the name and library of the library information file. If the file does not exist, specify CRTFILE(*YES) to create it. If you do not, a message is issued.

file-name
Enter the name of the file where the linkage information will be stored.

The possible library values are:

*LIBL
The system searches the library list.
*CURLIB
The name of the current library is used. If you have not specified a current library, QGPL is used.
library-name
Enter the name of the library where the linkage information file is located.
Top

Extract record options (OPTION)

Specifies the option of replacing, deleting, or updating data in the library information file.

*REPLACE
Clears all data in the library information file, and replaces it with the information extracted from the program specified on the PGM parameter.
*DELETE
Deletes the data in the library information file for the program specified on the PGM parameter. The deletion of data from this library information file results in a compressed file. Data that does not relate to the program specified on the PGM parameter remains in the library information file. No new information is added to the library information file.
*UPDATE
Deletes the existing information for the specified programs, and replaces it with new information. The deletion of data from this library information file results in a compressed file. If the specified library information file is empty, this option is equivalent to *REPLACE.
Top

Create the file (CRTFILE)

Creates a library information file to store the extracted information.

*NO
Does not create a library information file.
*YES
Creates a library information file to store the extracted information. Select *YES when the specified library information file does not exist. If the file exists, a message is displayed.
Top

Library name to record (RECLIB)

Specifies the name of the library where the programs are stored. At run-time and when you enter the SETPGMINF command, the system searches for programs in the library you specify here.

*LIBL
The system searches the library list.
*FOUND
During the processing of the EXTPGMINF command, the system records the name of the library where the specified programs are found. The system searches for the library that contained the programs at the time the EXTPGMINF command was processed.
library-name
Enter the name of the library.
Top

Consistency Check (CHECK)

Specifies that the data and entry points in your library information file are checked for consistency. If *NONE is specified, then no warning message will be given; otherwise a PSE warning message will be issued.

*ALL
Checks consistency of both data and entry points.
*ENTRY
Checks consistency of entry points.
*DATA
Checks consistency of data.
*NONE
No consistency checking is performed.
Top

Examples

None
Top

Error messages

None

Top