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

73 lines
2.3 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>End Program (ENDPGM)</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="ENDPGM.Top_Of_Page"></a>
<h2>End Program (ENDPGM)</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="#ENDPGM.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ENDPGM.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ENDPGM.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ENDPGM"></a>
<p>The End Program (ENDPGM) command specifies the end of a CL procedure. When the command is processed, it performs the same function as a RETURN command. That is, control is returned to the command immediately following the CALL command in the calling program.
</p>
<p>The ENDPGM command is not required at the end of a CL procedure. If the last statement in a CL procedure source file is reached and no ENDPGM command is found, an ENDPGM command is assumed by the compiler.
</p>
<p><b>Restrictions:</b> This command is valid only within a CL procedure.
</p>
<p>There are no parameters for this command.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ENDPGM.PARAMETERS.TABLE">Parameters</a></h3>None<br>
<table width="100%">
<tr><td align="right"><a href="#ENDPGM.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<hr size="2" width="100%">
<div><h3><a name="ENDPGM.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
PGM
:
ENDPGM
</pre>
</p>
<p>This CL procedure is identified by a PGM command that contains no parameters and is ended by the ENDPGM command.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ENDPGM.ERROR.MESSAGES">Error messages</a> </h3>
<p>None
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDPGM.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>