109 lines
5.8 KiB
HTML
109 lines
5.8 KiB
HTML
|
<?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="DDM example 2: Description of ORDERENT program" />
|
|||
|
<meta name="abstract" content="Initially, the ORDERENT program exists only in library PGMLIB on the central server (in Philadelphia)." />
|
|||
|
<meta name="description" content="Initially, the ORDERENT program exists only in library PGMLIB on the central server (in Philadelphia)." />
|
|||
|
<meta name="DC.Relation" scheme="URI" content="rbae5apaex2.htm" />
|
|||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|||
|
<meta name="DC.Format" content="XHTML" />
|
|||
|
<meta name="DC.Identifier" content="rbae5apaex2b" />
|
|||
|
<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>DDM example 2: Description of ORDERENT program</title>
|
|||
|
</head>
|
|||
|
<body id="rbae5apaex2b"><a name="rbae5apaex2b"><!-- --></a>
|
|||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|||
|
<h1 class="topictitle1">DDM example 2: Description of ORDERENT program</h1>
|
|||
|
<div><p>Initially, the ORDERENT program exists only in library PGMLIB on
|
|||
|
the central server (in Philadelphia).</p>
|
|||
|
<div class="section"><p>This program does the following items:</p>
|
|||
|
<ul><li>When an order entry operator enters a customer number, ORDERENT reads
|
|||
|
the customer number, then reads the first member of file CUSTMST2 in the PGMLIB
|
|||
|
library to find the customer name, address, and other information. The retrieved
|
|||
|
information is displayed to the operator, and the program asks for an item
|
|||
|
number and quantity desired.</li>
|
|||
|
<li>When the operator enters an item number and quantity desired and presses
|
|||
|
the Enter key, the program changes the corresponding primary item in the first
|
|||
|
member of the INVEN file, and it adds a record to the DETAIL file for each
|
|||
|
item and quantity entered. The program continues asking for another item number
|
|||
|
and quantity until the operator ends the program.</li>
|
|||
|
<li>When the operator ends the program, the file CUSTMAST is changed with
|
|||
|
the information for the entire order. (See the pseudocode of ORDERENT for
|
|||
|
details.)</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="section"><p>For the following examples, it is assumed that all users on the
|
|||
|
remote servers who need to access CUSTMAST in Philadelphia already have authority
|
|||
|
to do so, and that those who do not need authority do not have it. In these
|
|||
|
examples, the <span class="keyword">iSeries™ server</span> in Chicago
|
|||
|
does not have a compiler.</p>
|
|||
|
</div>
|
|||
|
<div class="section"><p>If we want this program to be used at all the remote locations
|
|||
|
that also stock a physical inventory, the program needs to be sent to each
|
|||
|
of the remote servers. We can assume that each of the remote servers has its
|
|||
|
own inventory and primary files INVEN, DETAIL, and CUSTMST2 (which is a copy
|
|||
|
of CUSTMAST). How the program can be sent to a remote server is described
|
|||
|
in <a href="rbae5tsk1.htm#rbae5tsk1">DDM example 2: Transfer a program to a target server</a>.</p>
|
|||
|
</div>
|
|||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
|||
|
</div>
|
|||
|
<div class="example"> <pre id="rbae5apaex2b__pseudo"><a name="rbae5apaex2b__pseudo"><!-- --></a><strong> Pseudocode for ORDERENT Program</strong>
|
|||
|
•
|
|||
|
•
|
|||
|
•
|
|||
|
DECLARE CUSTMAST CHANGE
|
|||
|
* Declare file CUSTMAST and allow changing.
|
|||
|
DECLARE CUSTMST2 READ
|
|||
|
* Declare file CUSTMST2 as read only.
|
|||
|
DECLARE INVEN CHANGE
|
|||
|
* Declare inventory file INVEN and allow changing.
|
|||
|
DECLARE DETAIL OUTPUT
|
|||
|
* Declare file DETAIL as output only.
|
|||
|
•
|
|||
|
•
|
|||
|
•
|
|||
|
Open CUSTMAST, CUSTMST2, INVEN, and DETAIL files
|
|||
|
* Begin program.
|
|||
|
Show order entry display asking for CUSTNO.
|
|||
|
* Order entry operator enters CUSTNO.
|
|||
|
If function key, go to End.
|
|||
|
Read CUSTNO from display.
|
|||
|
For CUSTNO, return NAME, ADDR, and other
|
|||
|
information from CUSTMST2 file.
|
|||
|
Show NAME, ADDR, and other information on display.
|
|||
|
LOOP: Display 'Item Number ___ Quantity Desired ____'.
|
|||
|
* Order entry operator enters item number and quantity.
|
|||
|
Read ITEMNO and Quantity Desired from display.
|
|||
|
If ITEMNO = 0 then go to LOOPEND.
|
|||
|
Change INVEN with ITEMNO and Quantity Desired.
|
|||
|
Write an item record to the DETAIL file.
|
|||
|
Go to LOOP.
|
|||
|
LOOPEND: For CUSTNO, change CUSTMAST using
|
|||
|
information in file INVEN.
|
|||
|
End
|
|||
|
* Program has ended.
|
|||
|
Close CUSTMAST, CUSTMST2, INVEN, and DETAIL files.
|
|||
|
RETURN</pre>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div>
|
|||
|
<div class="familylinks">
|
|||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5apaex2.htm" title="This second example shows how multiple locations in a customer's business can process the same order entry application using DDM.">DDM example 2: ORDERENT application</a></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</body>
|
|||
|
</html>
|