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

82 lines
2.6 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>End Select (ENDSELECT)</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="ENDSELECT.Top_Of_Page"></a>
<h2>End Select (ENDSELECT)</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="#ENDSELECT.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ENDSELECT.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ENDSELECT.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ENDSELECT"></a>
<p>The End Select (ENDSELECT) command is used with the SELECT command to select a group of commands that are to be processed. The ENDSELECT command specifies the end of the select group that is started with an associated SELECT command. The ENDSELECT command must be specified after the last WHEN or or OTHERWISE command in the select group.
</p>
<p>When select groups are nested, each group must have its own ENDSELECT command at its end. Every ENDSELECT command must be associated with a SELECT command; if too many ENDSELECT commands occur in the CL procedure source, a message is issued and the program is not created.
</p>
<p><b>Restrictions:</b>
</p>
<ul>
<li>This command is valid only within a CL procedure.
</li>
</ul>
<p>There are no parameters for this command.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDSELECT.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ENDSELECT.PARAMETERS.TABLE">Parameters</a></h3>None<br>
<table width="100%">
<tr><td align="right"><a href="#ENDSELECT.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<hr size="2" width="100%">
<div><h3><a name="ENDSELECT.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
DCL VAR(&amp;NAME) TYPE(*CHAR) LEN(10)
:
SELECT
WHEN COND(&amp;NAME *EQ *CMD) THEN(DO)
: (group of CL commands)
ENDDO
: (other WHEN or OTHERWISE commands)
ENDSELECT
</pre>
</p>
<p>The ENDSELECT command ends an active SELECT command group.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDSELECT.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ENDSELECT.ERROR.MESSAGES">Error messages</a> </h3>
<p>None
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDSELECT.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>