109 lines
3.8 KiB
HTML
109 lines
3.8 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">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Omitting Parameters in ILE CEE APIs</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- ILE1A SCRIPT A converted by B2H R4.1 (346) (CMS) by NLJONES at -->
|
|
<!-- RCHVMX on 25 Feb 1999 at 10:33:07 -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<!--End Header Records --><!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
|
|
|
|
<h2>Omitting Parameters in ILE CEE APIs</h2>
|
|
|
|
The ILE CEE APIs have parameters that can be omitted. The parameter table for
|
|
each ILE CEE API uses the term omissible for these parameters.
|
|
|
|
<p><strong>Warning: </strong> It is essential to pass the correct number
|
|
of parameters, including omitted parameters. You need to use the
|
|
language-specific syntax for omitted parameters; failure to do so may result in
|
|
unpredictable results, including a system failure.</p>
|
|
|
|
<p>For ILE C, you can omit a parameter by passing a null pointer in place of
|
|
the parameter. The following example in ILE C omits the fc parameter in the
|
|
call to the API.</p>
|
|
|
|
<pre>
|
|
#include <leawi.h>
|
|
main ()
|
|
{
|
|
CEExxxx(<em>&parm1, &parm2, ... &parmn, NULL</em>);
|
|
} /* NULL is used instead */
|
|
/* of the omitted parameter */
|
|
</pre>
|
|
|
|
For ILE COBOL, you can omit a parameter by specifying the reserved word OMITTED
|
|
in place of the parameter. The following example in ILE COBOL omits the fc
|
|
parameter in the call to the API.
|
|
|
|
<pre>
|
|
CALL PROCEDURE 'CEExxxx'
|
|
USING <em>parm1, parm2, ... parmn,</em> OMITTED.
|
|
</pre>
|
|
|
|
For ILE RPG, you can omit a parameter by specifying *OMIT in the result field
|
|
of a PARM opcode. The following example omits the fc parameter in the call to
|
|
the API.
|
|
|
|
<pre>
|
|
C CALLB 'CEExxxx'
|
|
C PARM <em>parm1
|
|
</em>C PARM <em>parm2
|
|
</em> ...
|
|
C PARM <em>parmn
|
|
</em>C PARM *OMIT
|
|
</pre>
|
|
|
|
For ILE RPG if you use a prototyped call when you code the prototype, you
|
|
specify OPTIONS(*OMIT) in the keywords area of the omissible parameter. Then
|
|
you can specify *OMIT for that parameter on the call.
|
|
|
|
<pre>
|
|
D CEExxxx PR OPDESC
|
|
D <em>parm1
|
|
</em>D <em>parm2
|
|
</em>D ...
|
|
D <em>parmn
|
|
</em>D <em>fc</em> OPTIONS(*OMIT)
|
|
|
|
C CALLP CEExxxx(<em>parm1 : parm2 :
|
|
</em>C <em>... : parmn : *OMIT</em>)
|
|
</pre>
|
|
|
|
<p>For more information about using ILE CEE APIs, see the following
|
|
sections:</p>
|
|
|
|
<ul>
|
|
<li><a href="ile1a2.htm">ILE CEE API Calling and Naming
|
|
Conventions</a> </li>
|
|
|
|
<li><a href="ile1a4.htm">Data Type Definitions of ILE CEE</a> </li>
|
|
|
|
<li><a href="ile1a6.htm">i5/OS Messages and the ILE CEE API Feedback
|
|
Code</a></li>
|
|
</ul>
|
|
|
|
<hr>
|
|
<table align="center" cellspacing="2" cellpadding="2">
|
|
<tr align="center">
|
|
<td align="center" valign="top"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"ile1a1.htm">ILE CEE APIs</a> | <a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|