ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1progxmp.htm

97 lines
6.2 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="Examples: Application programming" />
<meta name="abstract" content="This example application for distributed relational database use is written in RPG/400, COBOL/400, Java and ILE C/400 programming languages. This example shows how to use a distributed relational database for functional specification tasks." />
<meta name="description" content="This example application for distributed relational database use is written in RPG/400, COBOL/400, Java and ILE C/400 programming languages. This example shows how to use a distributed relational database for functional specification tasks." />
<meta name="DC.subject" content="application programming examples, programming examples, application, examples, application programming" />
<meta name="keywords" content="application programming examples, programming examples, application, examples, application programming" />
<meta name="DC.Relation" scheme="URI" content="rbal1kickoff.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1excreatecollection.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1exrpgprogram.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1excobolprogram.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1excprogram.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1exjavaprogram.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1exprogramoutput.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="rbal1progxmp" />
<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>Examples: Application programming</title>
</head>
<body id="rbal1progxmp"><a name="rbal1progxmp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: Application programming</h1>
<div><p>This example application for distributed relational database use
is written in RPG/400<sup>®</sup>, COBOL/400<sup>®</sup>, Java™ and
ILE C/400<sup>®</sup> programming
languages. This example shows how to use a distributed relational database
for functional specification tasks.</p>
<div class="section"><h4 class="sectiontitle">Example: Business requirement for distributed relational database</h4><p>The
application for the distributed relational database in this example is parts
stock management in an automobile dealer or distributor network.</p>
</div>
<div class="section"><p>This program checks the level of stock for each part in the local
part stock table. If this is below the re-order point, the program then checks
on the central tables to see whether there are any existing orders outstanding
and what quantity has been shipped against each order.</p>
</div>
<div class="section"><p>If the net quantity (local stock, plus orders, minus shipments)
is still below the re-order point, an order is placed for the part by inserting
rows in the appropriate tables on the central server. A report is printed
on the local server.</p>
</div>
<div class="section"><h4 class="sectiontitle">Technical Notes</h4> <dl><dt class="dlterm">Commitment control</dt>
<dd> <p>This program uses the concept of local and remote logical units of
work (LUW). Because this program uses remote unit of work, it is necessary
to close the current LUW on one server (COMMIT) before beginning a new unit
of work on another server.</p>
</dd>
<dt class="dlterm">Cursor repositioning</dt>
<dd> <p>When an LUW is committed and the application connects to another database,
all cursors are closed. This application requires the cursor reading the part
stock file to be re-opened at the next part number. To achieve this, the cursor
is defined to begin where the part number is greater than the current value
of part number, and to be ordered by part number. </p>
<div class="note"><span class="notetitle">Note:</span> This technique
will not work if there are duplicate rows for the same part number.</div>
</dd>
</dl>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbal1excreatecollection.htm">Example: Program definitions</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal1exrpgprogram.htm">Example: RPG program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal1excobolprogram.htm">Example: COBOL program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal1excprogram.htm">Example: C program using embedded SQL</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal1exjavaprogram.htm">Example: Java program</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal1exprogramoutput.htm">Example: Program output</a></strong><br />
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1kickoff.htm" title="Distributed database programming describes the distributed relational database management portion of the i5/OS licensed program. Distributed relational database management provides applications with access to data that is external to the applications and typically located across a network of computers.">Distributed database programming</a></div>
</div>
</div>
</body>
</html>