ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/hll1b.htm

178 lines
5.8 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">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<!-- 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 -->
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
<title>Examples of Records Written</title>
<!-- Begin Header Records ========================================= -->
</head>
<body>
<!-- End Header Records -->
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Examples of Records Written</h2>
<p>The following examples illustrate how compilers and preprocessors
communicate with the Application Development Manager/400 APIs in different
circumstances. In all these examples, assume that the compiles are submitted by
an Application Development Manager/400 BLDPART command, which means it has
called QLYSETS to set the status of the space to *READY before calling the
compiler or preprocessor.</p>
<p>It is also assumed that a cleanup is done after the compile by calling
QLYSETS again to set the status of the space to *COMPLETE.</p>
<h3><a name="Header_72">Example 1</a></h3>
<p>RPG/400<SUP>(R)</SUP> compiler successfully compiles source that has one include in
it.</p>
<p>The compiler first calls QLYGETS and determines that it was started by the
BLDPART command. Then it calls QLYWRTBI to pass records of the following record
types and in the following order:</p>
<ol type="1">
<li><strong>Processor member start</strong></li>
<li><strong>Include</strong></li>
<li><strong>Normal processor end</strong></li>
</ol>
<h3><a name="Header_73">Example 2</a></h3>
<p>DDS compiler successfully compiles source of type LF and creates a logical
file based on two physical files.</p>
<p>The compiler first calls QLYGETS and determines that it was started by the
BLDPART command. Then it calls QLYWRTBI to pass records of the following record
types and in the following order:</p>
<ol type="1">
<li><strong>Processor member start</strong></li>
<li><strong>File reference</strong>
<p>This record is called for the first physical file on which the logical file
is based. The based-on indicator is set to Y (yes).</p>
</li>
<li><strong>File reference</strong>
<p>This record is called for the second physical file on which the logical file
is based. The based-on indicator is set to Y (yes).</p>
</li>
<li><strong>Normal processor end</strong></li>
</ol>
<h3><a name="Header_74">Example 3</a></h3>
<p>COBOL/400<SUP>(R)</SUP> compiler fails when compiling source that has one include in it
because the include was not found in *LIBL.</p>
<p>The compiler first calls QLYGETS and determines that it was started by a
BLDPART command. Then it calls QLYWRTBI to pass records of the following record
types and in the following order:</p>
<ol type="1">
<li><strong>Processor member start</strong></li>
<li><strong>Abnormal processor end</strong></li>
</ol>
<h3><a name="Header_75">Example 4</a></h3>
<p>COBOL/400 compiler fails when compiling source that references a record
format of a database file because the file was not found in *LIBL.</p>
<p>The compiler first calls QLYGETS and determines that it was started by a
BLDPART command. Then it calls QLYWRTBI to pass records of the following record
types and in the following order:</p>
<ol type="1">
<li><strong>Processor member start</strong></li>
<li><strong>External reference error</strong>
<p>The name of the <em>Library specified</em> passed to QLYWRTBI is *LIBL.</p>
</li>
<li><strong>Abnormal processor end</strong></li>
</ol>
<h3><a name="Header_76">Example 5</a></h3>
<p>ILE C CRTBNDC compiler successfully compiles a *PGM from a source that has
one include in it.</p>
<p>The compiler calls QLYGETS and determines that it was started by the BLDPART
command. Then it calls QLYWRTBI to pass records of the following record types
and in the following order:</p>
<ol type="1">
<li><strong>Processor member start</strong></li>
<li><strong>Include</strong></li>
<li><strong>Normal processor end call next</strong></li>
<li><strong>Processor object start</strong></li>
<li><strong>Normal processor end</strong></li>
</ol>
<p><strong>Note:</strong> The Processor object start and the Normal processor
end records are written by the CRTPGM processor internally called by the
CRTBNDC compiler.</p>
<h3><a name="Header_77">Example 6</a></h3>
<p>CRTPGM binder successfully binds objects from 2 modules, and references a
bind directory and a service program.</p>
<p>The compiler calls QLYGETS and determines that it was started by the BLDPART
command. Then it calls QLYWRTBI to pass records of the following record types
and in the following order:</p>
<ol type="1">
<li><strong>Processor object start</strong></li>
<li><strong>Module reference</strong></li>
<li><strong>Module reference</strong></li>
<li><strong>Bind directory reference</strong></li>
<li><strong>Service program reference</strong></li>
<li><strong>Normal processor end</strong>.</li>
</ol>
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="#Top_Of_Page">Top</a> |
<a href="hll.htm">High-level Language APIs</a> |
<a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>