ibm-information-center/dist/eclipse/plugins/i5OS.ic.apiref_5.4.0.1/opmIlecompare.htm

130 lines
9.1 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="OPM and ILE API differences" />
<meta name="abstract" content="This topic gives an overview of how Original Program Model (OPM) APIs and Integrated Language Environment (ILE) APIs differ from each other. The ILE APIs include the UNIX-type APIs and the ILE CEE APIs, among others." />
<meta name="description" content="This topic gives an overview of how Original Program Model (OPM) APIs and Integrated Language Environment (ILE) APIs differ from each other. The ILE APIs include the UNIX-type APIs and the ILE CEE APIs, among others." />
<meta name="DC.Relation" scheme="URI" content="conEnvironment.htm" />
<meta name="DC.Relation" scheme="URI" content="opmLoggingILEC.htm" />
<meta name="DC.Relation" scheme="URI" content="opmLoggingCOBOL.htm" />
<meta name="DC.Relation" scheme="URI" content="opmLoggingRPG.htm" />
<meta name="DC.Relation" scheme="URI" content="opmLoggingILERPG.htm" />
<meta name="DC.Relation" scheme="URI" content="opmReportingILEC.htm" />
<meta name="DC.Relation" scheme="URI" content="opmReportingILECOBOL.htm" />
<meta name="DC.Relation" scheme="URI" content="opmReportingILERPG.htm" />
<meta name="DC.Relation" scheme="URI" content="conParameter.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="opmIlecompare" />
<meta name="DC.Language" content="en-us" />
<!-- 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. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>OPM and ILE API differences</title>
</head>
<body id="opmIlecompare"><a name="opmIlecompare"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">OPM and ILE API differences</h1>
<div><p>This topic gives an overview of how Original Program Model (OPM)
APIs and Integrated
Language Environment<sup>®</sup> (ILE) APIs differ from each other. The ILE APIs
include the UNIX-type APIs and the ILE CEE APIs, among others.</p>
<div class="section"><p></p>
<p>You must have the ILE language compiler on your system
to develop applications that use any ILE APIs.</p>
</div>
<div class="section"><h4 class="sectiontitle">Comparison of OPM and ILE APIs</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" class="firstcol" id="d0e32"> </th>
<th valign="top" id="d0e34">OPM APIs</th>
<th valign="top" id="d0e36">ILE APIs</th>
</tr>
</thead>
<tbody><tr><th valign="top" class="firstcol" id="d0e40" headers="d0e32 ">API Name</th>
<td valign="top" headers="d0e40 d0e34 ">Maximum number of characters: 8 Not case-sensitive</td>
<td valign="top" headers="d0e40 d0e36 ">Maximum number of characters: 30 Case-sensitive</td>
</tr>
<tr><th valign="top" class="firstcol" id="d0e47" headers="d0e32 ">Required Parameters <sup>1</sup></th>
<td valign="top" headers="d0e47 d0e34 ">Displayed in parameter box</td>
<td valign="top" headers="d0e47 d0e36 ">Displayed in parameter box</td>
</tr>
<tr><th valign="top" class="firstcol" id="d0e56" headers="d0e32 ">Optional Parameters</th>
<td valign="top" headers="d0e56 d0e34 ">Can include optional parameters. The optional parameters form a group,
and you must either include or exclude the entire group.</td>
<td valign="top" headers="d0e56 d0e36 ">No optional parameters</td>
</tr>
<tr><th valign="top" class="firstcol" id="d0e63" headers="d0e32 ">Omitted Parameters</th>
<td valign="top" headers="d0e63 d0e34 ">No omitted parameters</td>
<td valign="top" headers="d0e63 d0e36 ">Can include omitted parameters. When these parameters are omitted,
you must pass a null pointer.</td>
</tr>
<tr><th valign="top" class="firstcol" id="d0e70" headers="d0e32 ">Error Conditions <sup>2</sup> </th>
<td valign="top" headers="d0e70 d0e34 ">The error code parameter is common to most of the OPM APIs, and it
is used to return error codes and exception data to the application. The errors
that are returned for a given API are in the form of an error message and
include the 7-character message identifier.</td>
<td valign="top" headers="d0e70 d0e36 ">The ILE CEE APIs use feedback codes and conditions</td>
</tr>
<tr><th valign="top" class="firstcol" id="d0e80" headers="d0e32 ">Pointers</th>
<td valign="top" headers="d0e80 d0e34 ">Can be used, but are used less frequently than the ILE APIs.</td>
<td valign="top" headers="d0e80 d0e36 ">Due to the greater availability of pointer support in ILE languages,
there is a much greater use of pointers in ILE APIs. The use of pointers can
provide a performance advantage.</td>
</tr>
</tbody>
</table>
</div>
<div class="note"><span class="notetitle">Notes:</span> <ol><li>UNIX-type APIs include parameters in a Syntax box. </li>
<li>Error conditions <ul><li>The UNIX-type APIs use <em>errnos</em> and return values.</li>
<li>The national language data conversion APIs use <em>errnos</em> and return
values.</li>
<li>The Dynamic Screen Manager (DSM) supports returned values in addition
to the error code parameter.</li>
</ul>
<p>The <em>errnos</em> are provided as include files in the QSYSINC library.</p>
</li>
</ol>
</div>
<p>Following are examples of an OPM API and an ILE API that do
similar functions (log or report software errors). The ILE API example makes
use of pointers, whereas the OPM API does not. Both programs log software
errors by using first-failure data capture (FFDC).</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="opmLoggingILEC.htm">Example in ILE C: Logging software error (OPM API without pointers)</a></strong><br />
This program illustrates how to use APIs to log software errors using FFDC.</li>
<li class="ulchildlink"><strong><a href="opmLoggingCOBOL.htm">Example in OPM COBOL: Logging software error (OPM API without pointers)</a></strong><br />
This program registers an OPM COBOL Error Handler. After the successful completion of the registration of the error handler, this , program creates a data decimal error. This exception causes the error handler to be called which then logs the software error.</li>
<li class="ulchildlink"><strong><a href="opmLoggingRPG.htm">Example in OPM RPG: Logging software error (OPM API without pointers)</a></strong><br />
This program performs a divide-by-0 operation to cause an exception. This exception is caught using RPG *PSSR support, and the exception is then logged as a software error.</li>
<li class="ulchildlink"><strong><a href="opmLoggingILERPG.htm">Example in ILE RPG: Logging software error (OPM API without pointers)</a></strong><br />
This program performs a divide by 0 operation to cause an exception. This exception is caught using RPG's *PSSR support, and the exception is then logged as a software error.</li>
<li class="ulchildlink"><strong><a href="opmReportingILEC.htm">Example in ILE C: Report software error (ILE API with pointers)</a></strong><br />
This program illustrates how to use APIs to log software errors using FFDC.</li>
<li class="ulchildlink"><strong><a href="opmReportingILECOBOL.htm">Example in ILE COBOL: Reporting software error (ILE API with pointers)</a></strong><br />
This program registers an ILE COBOL Error Handler. After the successful completion of the registration of the error handler, this, program creates a decimal data error. This exception causes the error handler to be called which then logs the software error.</li>
<li class="ulchildlink"><strong><a href="opmReportingILERPG.htm">Example in ILE RPG: Reporting software error (ILE API with pointers)</a></strong><br />
This program performs a divide-by-0 operation to cause an exception. This exception is caught using RPGs *PSSR support, and the exception is then logged as a software error.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="conEnvironment.htm" title="This topic introduces the operating environments that i5/OS APIs exist on a system.">API environments</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="conParameter.htm" title="After you have found the API that you want to use, you need to code a call to an API and pass to the API the required set of parameters appropriate for that API.">API parameters</a></div>
</div>
</div>
</body>
</html>