155 lines
5.4 KiB
HTML
155 lines
5.4 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>Transfer Control (TFRCTL)</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="TFRCTL.Top_Of_Page"></a>
|
||
|
<h2>Transfer Control (TFRCTL)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>
|
||
|
<ul><li>Batch program (*BPGM)</li>
|
||
|
<li>Interactive program (*IPGM)</li>
|
||
|
</ul><b>Threadsafe: </b>Yes
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#TFRCTL.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#TFRCTL.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#TFRCTL.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="TFRCTL"></a>
|
||
|
<p>The Transfer Control (TFRCTL) command calls the specified program, passes control to it, and removes the transferring program from the return stack. Because the transferring program is removed from the call stack, control does not return to it when the called program returns control. Instead, control is returned to the command following the last call to the transferring program.
|
||
|
</p>
|
||
|
<p><b>Restrictions:</b>
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>This command is valid only within original program model (OPM) CL programs.
|
||
|
</li>
|
||
|
<li>You must have object operational (*OBJOPR) and execute (*EXECUTE) authorities to the program to be called, and *EXECUTE authority to the library where the program is located.
|
||
|
</li>
|
||
|
<li>The TFRCTL command is threadsafe, meaning that it can be used to call a program when the TFRCTL command is run in a job with multiple threads. No checking is done whether or not the program to be called is threadsafe.
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="TFRCTL.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="#TFRCTL.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 1</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>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#TFRCTL.PARM"><b>PARM</b></a></td>
|
||
|
<td valign="top">Parameter CL variable names</td>
|
||
|
<td valign="top">Values (up to 255 repetitions): <i>CL variable name</i></td>
|
||
|
<td valign="top">Optional, Positional 2</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="TFRCTL.PGM"></a>
|
||
|
<h3>Program (PGM)</h3>
|
||
|
<p>Specifies the program that receives control from the program transferring control.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
<p><b>Qualifier 1: Program</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the program.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 2: Library</b>
|
||
|
</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>*CURLIB</b></dt>
|
||
|
<dd>The current library for the thread is used to locate the program. If no library is specified as the current library for the thread, the QGPL library is used.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the library where the program is located.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="TFRCTL.PARM"></a>
|
||
|
<h3>Parameter CL variable names (PARM)</h3>
|
||
|
<p>Specifies one or more CL variables to be passed to the program that is to receive control. The variables passed can only be parameters that were passed to the program currently transferring control.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>CL-variable-name</i></b></dt>
|
||
|
<dd>Specify the name of the CL variable to be passed. A maximum of 255 variables can be specified.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="TFRCTL.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p>
|
||
|
<pre>
|
||
|
TFRCTL PGM(PROGA) PARM(&PARM1)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command transfers control to the program PROGA and passes the parameter &PARM1 to it. The parameter &PARM1 must previously have been passed to the program issuing this command.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="TFRCTL.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF0805</b></dt>
|
||
|
<dd>Error found when program &1 in &2 started.
|
||
|
</dd>
|
||
|
<dt><b>CPF0809</b></dt>
|
||
|
<dd>Transfer control (TFRCTL) to C program not allowed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#TFRCTL.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|