318 lines
11 KiB
HTML
318 lines
11 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>Start REXX Procedure (STRREXPRC)</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="STRREXPRC.Top_Of_Page"></a>
|
||
|
<h2>Start REXX Procedure (STRREXPRC)</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="#STRREXPRC.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#STRREXPRC.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#STRREXPRC.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="STRREXPRC"></a>
|
||
|
<p>The Start REXX Procedure (STRREXPRC) command calls the interpreter, explicitly specifying the library, file, and source member to interpret.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="STRREXPRC.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="#STRREXPRC.SRCMBR"><b>SRCMBR</b></a></td>
|
||
|
<td valign="top">Source member</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
<td valign="top">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#STRREXPRC.SRCFILE"><b>SRCFILE</b></a></td>
|
||
|
<td valign="top">Source 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: Source file</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>QREXSRC</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"><a href="#STRREXPRC.PARM"><b>PARM</b></a></td>
|
||
|
<td valign="top">Parameters</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#STRREXPRC.CMDENV"><b>CMDENV</b></a></td>
|
||
|
<td valign="top">Command environment</td>
|
||
|
<td valign="top">Single values: <b><u>*COMMAND</u></b>, *CPICOMM, *EXECSQL<br>Other values: <i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: Command environment</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="5"><a href="#STRREXPRC.EXITPGM"><b>EXITPGM</b></a></td>
|
||
|
<td valign="top">Exit program</td>
|
||
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values (up to 8 repetitions): <i>Element list</i></td>
|
||
|
<td valign="top" rowspan="5">Optional</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">Element 2: Exit code</td>
|
||
|
<td valign="top">
|
||
|
2, 3, 4, 5, 7, 8, 9, 10</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="STRREXPRC.SRCMBR"></a>
|
||
|
<h3>Source member (SRCMBR)</h3>
|
||
|
<p>Specifies the name of the source file member that contains the REXX procedure to be started.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="STRREXPRC.SRCFILE"></a>
|
||
|
<h3>Source file (SRCFILE)</h3>
|
||
|
<p>Specifies the source file that contains the REXX procedure to be started.
|
||
|
</p>
|
||
|
<p>The possible <b>source file</b> values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>QREXSRC</u></b></dt>
|
||
|
<dd>The IBM-supplied source file, QREXSRC, contains the REXX procedure.
|
||
|
</dd>
|
||
|
<dt><b><i>source-file-name</i></b></dt>
|
||
|
<dd>Specify the name of the source file that contains the REXX procedure to be run.
|
||
|
<p>The possible library values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The library list is used to locate the program.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library is used to locate the program. If no library is specified as the current library for the job, QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Specify the library name.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="STRREXPRC.PARM"></a>
|
||
|
<h3>Parameters (PARM)</h3>
|
||
|
<p>Specifies procedure parameter values passed to the REXX procedure when it is started. These values are accessed through the argument (ARG) instruction within the REXX procedure.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NONE</u></b></dt>
|
||
|
<dd>There are no procedure parameters for the REXX procedure. The ARG instruction returns a null string.
|
||
|
</dd>
|
||
|
<dt><b><i>procedure-parameters</i></b></dt>
|
||
|
<dd>Specify the procedure parameter value to pass to the REXX procedure. A maximum of 3000 characters is allowed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="STRREXPRC.CMDENV"></a>
|
||
|
<h3>Command environment (CMDENV)</h3>
|
||
|
<p>Specifies the initial command environment program to process commands embedded in the REXX procedure. The REXX interpreter will call this environment whenever a command is encountered within the REXX procedure.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*COMMAND</u></b></dt>
|
||
|
<dd>The AS/400 control language (CL) command environment is used.
|
||
|
</dd>
|
||
|
<dt><b>*CPICOMM</b></dt>
|
||
|
<dd>The Common Programming Interface (CPI) for Communications command environment is used.
|
||
|
</dd>
|
||
|
<dt><b>*EXECSQL</b></dt>
|
||
|
<dd>The Structured Query Language (SQL) Command environment is used. EXECSQL is the command environment used for CL commands that are imbedded within a REXX procedure.
|
||
|
</dd>
|
||
|
<dt><b><i>program-name</i></b></dt>
|
||
|
<dd>Specify the name of the program to process commands embedded in the REXX procedure.
|
||
|
<p>The possible library values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The library list is used to locate the program.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the job is used to locate the program. If no library is specified as the current library for the job, QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Specify the name of the library where the program is located.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="STRREXPRC.EXITPGM"></a>
|
||
|
<h3>Exit program (EXITPGM)</h3>
|
||
|
<p>Specifies exit programs to be used when the interpreter is called. A maximum of 8 program and exit code pairs can be specified.
|
||
|
</p>
|
||
|
<p>
|
||
|
<b>Note: </b>If multiple system exit codes are specified, the last one specified is the one taken.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NONE</u></b></dt>
|
||
|
<dd>There are no exit programs for this call.
|
||
|
</dd>
|
||
|
<dt><b><i>program-name</i></b></dt>
|
||
|
<dd>Specify a program name. A maximum of 8 program names can be specified.
|
||
|
<p>The possible library values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The library list is used to locate the programs.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the job is used to locate the programs. If no library is specified as the current library for the job, QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Specify the name of the library where the programs are located.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
<dt><b><i>exit-code</i></b></dt>
|
||
|
<dd>Specify an exit code. A maximum of 8 exit codes can be specified.
|
||
|
<dl>
|
||
|
<dt><b>Exit-code</b></dt>
|
||
|
<dd><b> Description
|
||
|
</b></dd>
|
||
|
<dt><b>2</b></dt>
|
||
|
<dd>The associated program is called whenever an external function or subroutine has been called by the REXX program. The exit program is then responsible for locating and calling the requested routine.
|
||
|
</dd>
|
||
|
<dt><b>3</b></dt>
|
||
|
<dd>The associated program is called whenever the interpreter is going to call a command. The exit program is responsible for locating and calling the command given the command string and the current environment name.
|
||
|
</dd>
|
||
|
<dt><b>4</b></dt>
|
||
|
<dd>The associated program is called whenever a REXX instruction or function attempts an operation on the REXX external data queue.
|
||
|
</dd>
|
||
|
<dt><b>5</b></dt>
|
||
|
<dd>The associated program is called when session input or output operations are attempted.
|
||
|
</dd>
|
||
|
<dt><b>7</b></dt>
|
||
|
<dd>The associated program is called after running each clause of the REXX procedure to determine whether it should be stopped.
|
||
|
</dd>
|
||
|
<dt><b>8</b></dt>
|
||
|
<dd>The associated program is called after running each clause of the REXX program to check if tracing should be turned on or off.
|
||
|
</dd>
|
||
|
<dt><b>9</b></dt>
|
||
|
<dd>The associated program is called before interpretation of the first instruction of a REXX procedure (including REXX procedures called as external functions and subroutines).
|
||
|
</dd>
|
||
|
<dt><b>10</b></dt>
|
||
|
<dd>The associated program is called after interpretation of the last instruction of a REXX procedure (including REXX procedures called as external functions and subroutines).
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="STRREXPRC.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p>
|
||
|
<pre>
|
||
|
STRREXPRC SRCMBR(ABC)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command calls the REXX interpreter instructing it to run the source member named ABC in the first QREXSRC source file in the library list (*LIBL).
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="STRREXPRC.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF7CFB</b></dt>
|
||
|
<dd>Error occurred while processing REXX exit programs.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CFD</b></dt>
|
||
|
<dd>Error occurred running REXX procedure &1.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CFF</b></dt>
|
||
|
<dd>REXX procedure &1 ended; return code &4.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CF2</b></dt>
|
||
|
<dd>REXX procedure &1 not found.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CF3</b></dt>
|
||
|
<dd>Not authorized to source file &2.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CF4</b></dt>
|
||
|
<dd>Cannot allocate REXX procedure &1.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CF6</b></dt>
|
||
|
<dd>Cannot allocate REXX source file &2.
|
||
|
</dd>
|
||
|
<dt><b>CPF7CF7</b></dt>
|
||
|
<dd>REXX external data queue is damaged.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#STRREXPRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|