Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Set Program Information (SETPGMINF) command is used with the extended program model (EPM) languages to associate all the program objects in an application. The SETPGMINF command defines the application environment, based on the information you supply on the ROOTPGM, SUBPGM, and LIBFILE parameters. The C/400*, FORTRAN/400*, and Pascal languages work within the extended program model.
EPM programs that refer to external symbols in other EPM programs must be specified on the SETPGMINF command. External symbols are calls to other compilation units or external storage. You do not need to use this command if your program consists of only one compilation unit, or if the program calls only non-EPM programs. If the programs you specify on the ROOTPGM and SUBPGM parameters have not been successfully compiled, SETPGMINF fails.
*ESCAPE Messages
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
ROOTPGM | Root program | Qualified object name | Required, Positional 1 |
Qualifier 1: Root program | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
SUBPGM | Sub-programs | Values (up to 200 repetitions): Element list | Optional, Positional 2 |
Element 1: Program | Qualified object name | ||
Qualifier 1: Program | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
LIBFILE | Library information files | Values (up to 16 repetitions): Element list | Optional, Positional 3 |
Element 1: File | Qualified object name | ||
Qualifier 1: File | Name, *SAME, *NONE, *PASLIB, *FTNLIB, *CLIB | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
LISTDETAIL | Listing detail | *NONE, *BASIC, *FULL | Optional |
PRTFILE | Print file | Qualified object name | Optional |
Qualifier 1: Print file | Name, QSYSPRT | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
RUNATTR | Run attributes | Element list | Optional |
Element 1: Maximum non-fatal errors | 0-100, 20, *NOMAX | ||
Element 2: Fatal error severity | 0-40, 40 | ||
Element 3: External Type Checking | *YES, *NO | ||
Element 4: Computational Attributes | *LANG, *ALL, *NONE | ||
PFROPT | Performance options | Element list | Optional |
Element 1: Access group storage | *NONE, *ALL | ||
HEAPSIZE | Initial size of heap spaces | Element list | Optional |
Element 1: Dynamic storage heap | 1024-16777216, 16000, *NONE | ||
Element 2: Static storage heap | 1024-16777216, 32000 | ||
STACKSIZE | Initial size of auto storage | Element list | Optional |
Element 1: | 1024-16777216, 16000 | ||
SSNATTR | Session file attributes | Element list | Optional |
Element 1: File size | 8192-16000000, 32000 | ||
Element 2: Buffer size | 80-1024, 160 | ||
DBGOPT | Debug options | Element list | Optional |
Element 1: Debug initialization | *ON, *OFF |
Top |
Specifies the name of the program which will contain the environment definition necessary to create the EPM run-time environment. This program, called a default entry point or root program, contains the references to external symbols. In C, the default entry point is usually the program that contains a main() function. Pascal defines the main begin block of the program unit as the default entry point. FORTRAN defines the main program (the program defined on the PROGRAM statement) as the default entry point. *Change authority is required.
ROOTPGM is a required parameter.
Possible library values are:
Top |
Specifies a list of all the program objects that you want to include in the run-time environment for your application. These programs can be either EPM or non-EPM program objects.
Up to 200 program objects can be specified on the SUBPGM parameter. You can specify more than 200 related program objects for 1 application if you nest SETPGMINF commands.
Possible library values are:
These SUBPGMs are sought at run-time, according to the library specifications used when you specify the SETPGMINF command. If you specify a specific library, or use *CURLIB, only that specific library is searched for the program object. If the library designated as the current library changes between the time you issue the SETPGMINF command and the time you run your program, not all of the program objects will be found and you will receive an error message.
Top |
Specifies the library information file that contains information used to resolve any outstanding external references after all of the program objects identified on the ROOTPGM and SUBPGM parameters have been processed. Library information files are searched in the order that they are specified.
Several library information files are IBM-supplied. These files contain the EPM language library functions.
You can create and update your own library information file with the Extract Program Information (EXTPGMINF) command.
The possible library values are:
Top |
Specifies whether a SETPGMINF listing is created. The listing will have the same name as the program specified on the ROOTPGM parameter and is directed to the library and file specified on the PRTFILE parameter.
The PRTFILE parameter is not displayed unless you request a listing (*BASIC or *FULL) on the LISTDETAIL parameter.
Top |
Specifies the name and library of the printer file where the SETPGMINF listing is directed. The file should have a minimum length of 132. If you specify a file with a record length of less than 132, information may be lost.
This parameter does not appear on the prompting display unless you change the default value on the LISTDETAIL parameter to *BASIC or *FULL.
The possible library values are:
Top |
Specifies the number of times the non-fatal error counter is incremented before processing ends, and the message severity-level that is interpreted as a fatal error at run-time. A fatal error is an error that stops your application from running. You can also specify whether you want external type checking to take place at program run-time. The computational attributes field allows you to set the attributes for controlling floating point operations in the run-time environment.
Top |
Specifies whether the space allocated for static, automatic, and dynamic program variables is part of the process access group.
Top |
Specifies the initial size of the heap spaces for the dynamic and static storage heap. The heap size specified will expand as your application progresses.
The dynamic storage heap consists of the storage that you have allocated in your application with the C/400 memory routines (malloc, calloc, realloc) or the NEW procedure in Pascal.
The static storage heap consists of the storage that you have allocated in your application with static and external static variables.
Top |
Specifies the initial size of the automatic storage stack. The stack size specified will expand as your application progresses.
The automatic storage stack consists of the storage that you have allocated in your application with automatic variables.
Top |
Specifies the file session attributes for the file and buffer size.
Top |
Specifies the use of the extended program model (EPM) debug tool at run-time, if server debug mode is active. To activate server debug mode, enter the STRDBG command.
Top |
Top |
Top |