ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/setpgminf.htm

532 lines
22 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Set Program Information (SETPGMINF)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="SETPGMINF.Top_Of_Page"></a>
<h2>Set Program Information (SETPGMINF)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#SETPGMINF.PARAMETERS.TABLE">Parameters</a><br>
<a href="#SETPGMINF.COMMAND.EXAMPLES">Examples</a><br>
<a href="#SETPGMINF.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="SETPGMINF"></a>
<p>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.
</p>
<p>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.
</p>
<h3>Error messages for SETPGMINF</h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>PSE4017</b></dt>
<dd>Errors occurred in SETPGMINF command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SETPGMINF.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SETPGMINF.ROOTPGM"><b>ROOTPGM</b></a></td>
<td valign="top">Root program</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Root program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="4"><a href="#SETPGMINF.SUBPGM"><b>SUBPGM</b></a></td>
<td valign="top">Sub-programs</td>
<td valign="top">Values (up to 200 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="4">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top">Element 1: Program</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="4"><a href="#SETPGMINF.LIBFILE"><b>LIBFILE</b></a></td>
<td valign="top">Library information files</td>
<td valign="top">Values (up to 16 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="4">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top">Element 1: File</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: File</td>
<td valign="top"><i>Name</i>, <b><u>*SAME</u></b>, *NONE, *PASLIB, *FTNLIB, *CLIB</td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#SETPGMINF.LISTDETAIL"><b>LISTDETAIL</b></a></td>
<td valign="top">Listing detail</td>
<td valign="top"><b><u>*NONE</u></b>, *BASIC, *FULL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SETPGMINF.PRTFILE"><b>PRTFILE</b></a></td>
<td valign="top">Print file</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Print file</td>
<td valign="top"><i>Name</i>, <b><u>QSYSPRT</u></b></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="5"><a href="#SETPGMINF.RUNATTR"><b>RUNATTR</b></a></td>
<td valign="top">Run attributes</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="5">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Maximum non-fatal errors</td>
<td valign="top">
0-100, <b><u>20</u></b>, *NOMAX</td>
</tr>
<tr>
<td valign="top">Element 2: Fatal error severity</td>
<td valign="top">
0-40, <b><u>40</u></b></td>
</tr>
<tr>
<td valign="top">Element 3: External Type Checking</td>
<td valign="top">
<b><u>*YES</u></b>, *NO</td>
</tr>
<tr>
<td valign="top">Element 4: Computational Attributes</td>
<td valign="top">
<b><u>*LANG</u></b>, *ALL, *NONE</td>
</tr>
<tr>
<td valign="top" rowspan="2"><a href="#SETPGMINF.PFROPT"><b>PFROPT</b></a></td>
<td valign="top">Performance options</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="2">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Access group storage</td>
<td valign="top">
<b><u>*NONE</u></b>, *ALL</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SETPGMINF.HEAPSIZE"><b>HEAPSIZE</b></a></td>
<td valign="top">Initial size of heap spaces</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Dynamic storage heap</td>
<td valign="top">
1024-16777216, <b><u>16000</u></b>, *NONE</td>
</tr>
<tr>
<td valign="top">Element 2: Static storage heap</td>
<td valign="top">
1024-16777216, <b><u>32000</u></b></td>
</tr>
<tr>
<td valign="top" rowspan="2"><a href="#SETPGMINF.STACKSIZE"><b>STACKSIZE</b></a></td>
<td valign="top">Initial size of auto storage</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="2">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: </td>
<td valign="top">
1024-16777216, <b><u>16000</u></b></td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SETPGMINF.SSNATTR"><b>SSNATTR</b></a></td>
<td valign="top">Session file attributes</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: File size</td>
<td valign="top">
8192-16000000, <b><u>32000</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Buffer size</td>
<td valign="top">
80-1024, <b><u>160</u></b></td>
</tr>
<tr>
<td valign="top" rowspan="2"><a href="#SETPGMINF.DBGOPT"><b>DBGOPT</b></a></td>
<td valign="top">Debug options</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="2">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Debug initialization</td>
<td valign="top">
<b><u>*ON</u></b>, *OFF</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="SETPGMINF.ROOTPGM"></a>
<h3>Root program (ROOTPGM)</h3>
<p>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.
</p>
<p>ROOTPGM is a required parameter.
</p>
<dl>
<dt><b><i>program-name</i></b></dt>
<dd>The name of the EPM program object that contains the default entry point.
</dd>
</dl>
<p>Possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>The system searches the library list for the root program object.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library is searched. If you have not specified the current library, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Enter the name of the library where the root program object is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.SUBPGM"></a>
<h3>Sub-programs (SUBPGM)</h3>
<p>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.
</p>
<p>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.
</p>
<dl>
<dt><b><i>program-name</i></b></dt>
<dd>Enter the name of the program object. You can specify up to 200 program objects on one SETPGMINF command.
</dd>
</dl>
<p>Possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>The system searches the library list for the library containing the program objects.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The name of the current library is used. If you have not specified the current library, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Enter the name of the library where the program object is located.
</dd>
</dl>
<p>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.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.LIBFILE"></a>
<h3>Library information files (LIBFILE)</h3>
<p>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.
</p>
<p>Several library information files are IBM-supplied. These files contain the EPM language library functions.
</p>
<p>You can create and update your own library information file with the Extract Program Information (EXTPGMINF) command.
</p>
<dl>
<dt><b><u>*SAME</u></b></dt>
<dd>Use the same library information file as was used in the last environment definition. If this is the first time an environment is defined, the run-time library file for the language object specified on the ROOTPGM parameter is used. For example, if your ROOTPGM was compiled using the C/400 compiler, the default library information file is *CLIB.
</dd>
<dt><b>*NONE</b></dt>
<dd>No library information file is used.
</dd>
<dt><b>*PASLIB</b></dt>
<dd>The Pascal run-time library information file is used.
</dd>
<dt><b>*CLIB</b></dt>
<dd>The C/400 run-time library information file is used.
</dd>
<dt><b>*FTNLIB</b></dt>
<dd>The FORTRAN/400 run-time library information file is used.
</dd>
<dt><b><i>file-name</i></b></dt>
<dd>Enter the name of the library information file. This library information file must exist. To create a library information file, use the EXTPGMINF command.
</dd>
</dl>
<p>The possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>The system searches the library list for the specified library information file.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library is used to locate the library information file. If you have not specified the current library, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Enter the name of the library that contains the library information file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.LISTDETAIL"></a>
<h3>Listing detail (LISTDETAIL)</h3>
<p>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.
</p>
<p>The PRTFILE parameter is not displayed unless you request a listing (*BASIC or *FULL) on the LISTDETAIL parameter.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>A listing is not created.
</dd>
<dt><b>*BASIC</b></dt>
<dd>A listing is created that includes all of the symbol references and definitions that result from the programs specified on the ROOTPGM and SUBPGM parameters.
</dd>
<dt><b>*FULL</b></dt>
<dd>A listing is created that includes all of the symbol references and definitions for the entire application. This includes the symbol references and definitions for all the programs specified on the LIBFILE parameter that are not explicitly referenced in your application.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.PRTFILE"></a>
<h3>Print file (PRTFILE)</h3>
<p>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.
</p>
<p>This parameter does not appear on the prompting display unless you change the default value on the LISTDETAIL parameter to *BASIC or *FULL.
</p>
<dl>
<dt><b><u>QSYSPRT</u></b></dt>
<dd>The SETPGMINF listing is placed in the file QSYSPRT.
</dd>
<dt><b><i>file-name</i></b></dt>
<dd>Enter the name of the file where the SETPGMINF listing is to be placed.
</dd>
</dl>
<p>The possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>The system searches the library list.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The name of the current library is used. If you have not specified the current library, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Enter the name of the library where the file is stored.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.RUNATTR"></a>
<h3>Run attributes (RUNATTR)</h3>
<p>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.
</p>
<dl>
<dt><b><u>20</u></b></dt>
<dd>The non-fatal error counter is incremented up to 20 times before the processing of your application ends.
</dd>
<dt><b>*NOMAX</b></dt>
<dd>The non-fatal error counter has no limit and will not stop the processing of your application.
</dd>
<dt><b><i>counter-number</i></b></dt>
<dd>The number of non-fatal errors that are allowed before processing ends.
</dd>
<dt><b><u>40</u></b></dt>
<dd>A message with a severity-level of 40 or higher is interpreted as a fatal error.
</dd>
<dt><b><i>severity-level</i></b></dt>
<dd>The message severity-level that is interpreted as a fatal error. If a severity-level of 0 is specified, your application stops running if any errors occur.
</dd>
<dt><b><u>*YES</u></b></dt>
<dd>External type checking is performed at program run-time.
</dd>
<dt><b>*NO</b></dt>
<dd>External type checking is not performed at program run-time. Any warning messages that occur as a result of checking errors are not issued when you run your program.
</dd>
<dt><b><u>*LANG</u></b></dt>
<dd>Computational attributes are set according to the semantics of the EPM language.
</dd>
<dt><b>*ALL</b></dt>
<dd>Floating point exceptions are disabled or masked.
</dd>
<dt><b>*NONE</b></dt>
<dd>Floating point exceptions are enabled or unmasked.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.PFROPT"></a>
<h3>Performance options (PFROPT)</h3>
<p>Specifies whether the space allocated for static, automatic, and dynamic program variables is part of the process access group.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>The storage spaces created are not part of the process access group (PAG).
</dd>
<dt><b>*ALL</b></dt>
<dd>The storage spaces created are part of the process access group (PAG). This option can improve the performance of programs that use limited program variable storage, and are run on a non-dedicated system. Information on performance tools and CL commands you can use to display and analyze the PAG can be found in the Performance Tools Guide.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.HEAPSIZE"></a>
<h3>Initial size of heap spaces (HEAPSIZE)</h3>
<p>Specifies the <u> initial</u> size of the heap spaces for the dynamic and static storage heap. The heap size specified will expand as your application progresses.
</p>
<p>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.
</p>
<p>The static storage heap consists of the storage that you have allocated in your application with static and external static variables.
</p>
<dl>
<dt><b><u>16000</u></b></dt>
<dd>The initial size of the dynamic storage heap is 16000 bytes.
</dd>
<dt><b>*NONE</b></dt>
<dd>No initial dynamic storage is allocated. Use *NONE only if you do not use any EPM memory management functions in your application. If you specify *NONE and use any of the memory functions, you will get pointer exceptions and your application will stop processing.
</dd>
<dt><b><i>dynamic-storage-size</i></b></dt>
<dd>Enter the initial size of the dynamic storage heap. The initial size can be between 1024 and 16777216 bytes.
</dd>
<dt><b><u>32000</u></b></dt>
<dd>The initial size of the static storage heap is 32000 bytes.
</dd>
<dt><b><i>static-storage-size</i></b></dt>
<dd>Enter the initial size of the static storage heap. The initial size can be between 1024 and 16777216 bytes. If you use static variables extensively in your application your performance can improve if you specify a larger storage heap than the default.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.STACKSIZE"></a>
<h3>Initial size of auto storage (STACKSIZE)</h3>
<p>Specifies the <u> initial</u> size of the automatic storage stack. The stack size specified will expand as your application progresses.
</p>
<p>The automatic storage stack consists of the storage that you have allocated in your application with automatic variables.
</p>
<dl>
<dt><b><u>16000</u></b></dt>
<dd>The initial size of the automatic storage stack is 16000 bytes.
</dd>
<dt><b><i>automatic-storage-size</i></b></dt>
<dd>Enter the initial size of the automatic storage stack. The initial size can be between 1024 and 16777216 bytes. If your application contains a large number of recursive calls, you should increase the initial size of the stack.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.SSNATTR"></a>
<h3>Session file attributes (SSNATTR)</h3>
<p>Specifies the file session attributes for the file and buffer size.
</p>
<dl>
<dt><b><u>32000</u></b></dt>
<dd>The default size for the file is 32000 bytes.
</dd>
<dt><b><i>file-size</i></b></dt>
<dd>Specify a value for the file size between 8192 and 16000000 bytes. If your file exceeds the size you specify, the information at the top rolls off the display. This information is lost.
</dd>
<dt><b><u>160</u></b></dt>
<dd>The default size for the buffer is 160 bytes.
</dd>
<dt><b><i>buffer-size</i></b></dt>
<dd>Specify a value for the buffer size between 80 and 1024 bytes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETPGMINF.DBGOPT"></a>
<h3>Debug options (DBGOPT)</h3>
<p>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.
</p>
<dl>
<dt><b><u>*ON</u></b></dt>
<dd>EPM debug starts at run-time if server debug mode is active.
</dd>
<dt><b>*OFF</b></dt>
<dd>EPM debug will not start at run-time. You can use server debug to debug your programs, but EPM language variable names, statement numbers, and debugging commands are not available.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SETPGMINF.COMMAND.EXAMPLES">Examples</a></h3>None
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SETPGMINF.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>PSE4017</b></dt>
<dd>Errors occurred in SETPGMINF command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETPGMINF.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>