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

426 lines
14 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Add Exit Program (ADDEXITPGM)</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="ADDEXITPGM.Top_Of_Page"></a>
<h2>Add Exit Program (ADDEXITPGM)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Yes
</td>
<td valign="top" align="right">
<a href="#ADDEXITPGM.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ADDEXITPGM.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ADDEXITPGM.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ADDEXITPGM"></a>
<p>The Add Exit Program (ADDEXITPGM) command adds an exit program entry for a specific exit point. Each exit point can have a single entry or multiple entries. The exit program number indicates the sequence in which the exit programs are run.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ADDEXITPGM.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"><a href="#ADDEXITPGM.EXITPNT"><b>EXITPNT</b></a></td>
<td valign="top">Exit point</td>
<td valign="top"><i>Simple name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.FORMAT"><b>FORMAT</b></a></td>
<td valign="top">Exit point format</td>
<td valign="top"><i>Simple name</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.PGMNBR"><b>PGMNBR</b></a></td>
<td valign="top">Program number</td>
<td valign="top">1-2147483647, *LOW, *HIGH</td>
<td valign="top">Required, Positional 3</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ADDEXITPGM.PGM"><b>PGM</b></a></td>
<td valign="top">Program</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 4</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#ADDEXITPGM.THDSAFE"><b>THDSAFE</b></a></td>
<td valign="top">Threadsafe</td>
<td valign="top"><b><u>*UNKNOWN</u></b>, *NO, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.MLTTHDACN"><b>MLTTHDACN</b></a></td>
<td valign="top">Multithreaded job action</td>
<td valign="top"><b><u>*SYSVAL</u></b>, *RUN, *MSG, *NORUN</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.TEXT"><b>TEXT</b></a></td>
<td valign="top">Text 'description'</td>
<td valign="top"><i>Character value</i>, <b><u>*BLANK</u></b>, *MSGID</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.MSGID"><b>MSGID</b></a></td>
<td valign="top">Message identifier</td>
<td valign="top"><i>Simple name</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ADDEXITPGM.MSGF"><b>MSGF</b></a></td>
<td valign="top">Message 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: Message file</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></td>
</tr><tr>
<td valign="top"><a href="#ADDEXITPGM.REPLACE"><b>REPLACE</b></a></td>
<td valign="top">Replace existing entry</td>
<td valign="top">*YES, <b><u>*NO</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ADDEXITPGM.CRTEXITPNT"><b>CRTEXITPNT</b></a></td>
<td valign="top">Create exit point</td>
<td valign="top">*YES, <b><u>*NO</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="4"><a href="#ADDEXITPGM.PGMDTA"><b>PGMDTA</b></a></td>
<td valign="top">Exit program data</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="4">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Coded character set ID</td>
<td valign="top">
<i>Integer</i>, <b><u>*JOB</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Length of data</td>
<td valign="top">
0-2048, <b><u>*CALC</u></b></td>
</tr>
<tr>
<td valign="top">Element 3: Program data</td>
<td valign="top">
<i>Character value</i>, <b><u>X''</u></b></td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="ADDEXITPGM.EXITPNT"></a>
<h3>Exit point (EXITPNT)</h3>
<p>Specifies the exit point name to which the exit program is added. If no exit point by this name exists, and CRTEXITPNT(*YES) is specified, an exit point is created.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.FORMAT"></a>
<h3>Exit point format (FORMAT)</h3>
<p>Specifies the exit point format name of the exit program that is added.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.PGMNBR"></a>
<h3>Program number (PGMNBR)</h3>
<p>Specifies the sequence in which the exit programs are run when multiple exit point programs for a specific exit point are defined.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b>*LOW</b></dt>
<dd>The lowest available number for that specific exit point is assigned.
</dd>
<dt><b>*HIGH</b></dt>
<dd>The highest available number for that specific exit point is assigned.
</dd>
<dt><b><i>program-number</i></b></dt>
<dd>Specify the exit program sequence number. Valid values range from 1 through 2,147,483,647. Processing sequence is from the lowest number to the highest number. Exit program numbers do not need to be consecutive.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.PGM"></a>
<h3>Program (PGM)</h3>
<p>Specifies the name of exit program to be called. The program does not have to exist on the system when this command is run.
</p>
<p>The name of the exit program can be qualified by one of the following library values:
</p>
<dl>
<dt><b><u>*CURLIB</u></b></dt>
<dd>The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
</dl>
<dl>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library where the exit program is located.
</dd>
</dl>
<p>The possible value is:
</p>
<dl>
<dt><b><i>program-name</i></b></dt>
<dd>Specify the name of the exit program.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.THDSAFE"></a>
<h3>Threadsafe (THDSAFE)</h3>
<p>Specify the threadsafe attribute for the exit program entry. If you do not know the threadsafety status of the exit program entry, use the default value of *UNKNOWN.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*UNKNOWN</u></b></dt>
<dd>The threadsafety status of this exit program entry is not known.
</dd>
<dt><b>*NO</b></dt>
<dd>The exit program entry is not threadsafe.
</dd>
<dt><b>*YES</b></dt>
<dd>The exit program entry is threadsafe.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.MLTTHDACN"></a>
<h3>Multithreaded job action (MLTTHDACN)</h3>
<p>Specify the multithreaded job action for this exit program entry. If you do not know the action to take in a multithreaded job, use the default value of *SYSVAL.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*SYSVAL</u></b></dt>
<dd>The multithreaded job action specified in the QMLTTHDACN system value is used.
</dd>
<dt><b>*RUN</b></dt>
<dd>Run the exit program entry.
</dd>
<dt><b>*MSG</b></dt>
<dd>Run the exit program entry and send an informational message.
</dd>
<dt><b>*NORUN</b></dt>
<dd>Do not run the exit program entry.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.TEXT"></a>
<h3>Text 'description' (TEXT)</h3>
<p>Specifies the text that briefly describes the exit program.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*BLANK</u></b></dt>
<dd>No text is specified.
</dd>
<dt><b>*MSGID</b></dt>
<dd>The description is taken from the message specified by the MSGID and MSGF parameters. The description is retrieved when exit program information is displayed using the WRKREGINF (Work with Registration Information) command or retrieved using the QusRetrieveExitInformation API.
</dd>
<dt><b><i>'description'</i></b></dt>
<dd>Specify no more than 50 characters of text, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.MSGID"></a>
<h3>Message identifier (MSGID)</h3>
<p>Specifies the message identifier that contains the text that describes the exit program. The message is retrieved from the message file specified by the MSGF parameter. This parameter can only be specified if TEXT(*MSGID) is specified.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><i>message-identifier</i></b></dt>
<dd>Specify the seven-character message identifier of the message that describes the exit program.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.MSGF"></a>
<h3>Message file (MSGF)</h3>
<p>Specifies the message file and library that contains the message specified by the MSGID parameter. This parameter can only be specified if TEXT(*MSGID) is specified. The name of the message file is qualified by one of the following library values:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library where the message file is located.
</dd>
</dl>
<p>The possible values are:
</p>
<dl>
<dt><b><i>message-file</i></b></dt>
<dd>Specify the name of the message file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.REPLACE"></a>
<h3>Replace existing entry (REPLACE)</h3>
<p>Specify whether the attributes and data for an exit program entry are replaced. New values for the program data and the text or message identifier can be specified. The program name and library cannot be changed.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>Do not replace the attributes and data for an exit program.
</dd>
<dt><b>*YES</b></dt>
<dd>Replace the attributes and data for and exit program entry.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.CRTEXITPNT"></a>
<h3>Create exit point (CRTEXITPNT)</h3>
<p>Specify whether the exit point is automatically created if it does not already exist.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>Do not create the exit point. If the specified exit point does not exist the exit program is not added and an error message is returned.
</dd>
<dt><b>*YES</b></dt>
<dd>Create the specified exit point.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDEXITPGM.PGMDTA"></a>
<h3>Exit program data (PGMDTA)</h3>
<p>Specifies the data that is passed to the exit program. This data should correspond to the input data defined by the exit point provider.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No data is passed to the exit program.
</dd>
</dl>
<p>The possible CCSID for program data values are:
</p>
<dl>
<dt><b><u>*JOB</u></b></dt>
<dd>The CCSID (coded character set identifier) of the current job is used.
</dd>
<dt><b><i>CCSID-for-data</i></b></dt>
<dd>Specify the CCSID associated with the data passed to the exit program.
</dd>
</dl>
<p>The possible Length of program data values are:
</p>
<dl>
<dt><b><u>*CALC</u></b></dt>
<dd>The length is determined by the number of bytes specified for the third element of this parameter.
</dd>
<dt><b><i>length-of-data</i></b></dt>
<dd>Specify the number of bytes of data passed to the exit program.
</dd>
</dl>
<p>The possible Program data value is:
</p>
<dl>
<dt><b><i>program-data</i></b></dt>
<dd>Specify the character or hexadecimal program data to be passed to the exit program. If you specify more program data than the length specified, the program data passed to the exit program is truncated. If you specify less program data than the length specified, the program data passed to the exit program is padded on the right with blanks. You can specify up to 2048 bytes of program data.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ADDEXITPGM.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
ADDEXITPGM EXITPNT(USER_EXIT_ONE) FORMAT(EXIT1) PGMNBR(1)
PGM(LIB2/MYPGM) TEXT(*MSGID) MSGID(TXT2345)
MSGF(LIB1/MYMSGF)
</pre>
</p>
<p>This command adds exit program MYPGM in library LIB2 to exit point USER_EXIT_ONE. This is first exit program run for the exit point. The text description for the exit program is retrieved from message TXT2345 in message file MYMSGF in library LIB1. No program data is passed to the exit program.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ADDEXITPGM.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF0001</b></dt>
<dd>Error found on &amp;1 command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDEXITPGM.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>