ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddm_5.4.0.1/rbae5apaex1.htm

100 lines
6.5 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="DDM example 1: Simple inquiry application" />
<meta name="abstract" content="This first example shows how multiple locations in a customer's business might be processing the same inquiry application on their own servers, using their own primary files. Without DDM, the two locations shown here (Chicago and Toronto) have their own primary file (CUSTMAST), both with different and duplicate levels of information." />
<meta name="description" content="This first example shows how multiple locations in a customer's business might be processing the same inquiry application on their own servers, using their own primary files. Without DDM, the two locations shown here (Chicago and Toronto) have their own primary file (CUSTMAST), both with different and duplicate levels of information." />
<meta name="DC.subject" content="application program, inquiry example, inquiry application, example, application program, programs, using overrides" />
<meta name="keywords" content="application program, inquiry example, inquiry application, example, application program, programs, using overrides" />
<meta name="DC.Relation" scheme="URI" content="rbae5code.htm" />
<meta name="DC.Relation" scheme="URI" content="../rbam6/rbam6clmain.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="rbae5apaex1" />
<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 1: Simple inquiry application</title>
</head>
<body id="rbae5apaex1"><a name="rbae5apaex1"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">DDM example 1: Simple inquiry application</h1>
<div><p>This first example shows how multiple locations in a customer's
business might be processing the same inquiry application on their own servers,
using their own primary files. Without DDM, the two locations shown here (Chicago
and Toronto) have their own primary file (CUSTMAST), both with different and
duplicate levels of information.</p>
<div class="example"> <div class="fignone" id="rbae5apaex1__lclinqs"><a name="rbae5apaex1__lclinqs"><!-- --></a><span class="figcap">Figure 1. Two non-DDM servers doing local inquiries</span><br /><img src="rsll111.gif" alt="This figure is described in the preceding text." /><br /></div>
</div>
<div class="section"><p>The following program (in pseudocode form) is run at each location
to access its own primary file named CUSTMAST.</p>
<pre> Open CUSTMAST
LOOP: Prompt for CUSTNO
If function 1, go to END
Get customer record
Display
Go to LOOP
END: Close CUSTMAST
RETURN</pre>
</div>
<div class="section"><p>Using DDM, the CUSTMAST files are consolidated into one file at
a centralized location (Philadelphia, in these examples), and then the local
files in Chicago and Toronto can be deleted. The inquiry program used at each
remote location and at the central location to access that file is identical
to the program used previously.</p>
</div>
<div class="section"><p>To perform <em>remote</em> inquiries without changing the program,
each of the remote locations need only create a DDM file and use an override
command:</p>
<pre>CRTDDMF FILE(INQ) RMTFILE(CUSTMAST) RMTLOCNAME(PHILLY)
OVRDBF FILE(CUSTMAST) TOFILE(INQ)</pre>
</div>
<div class="section"><p>The DDM file points to the Philadelphia server as the target server
and to the CUSTMAST file as the remote file. The same values for this command
can be used at each remote location if they also have a remote location named
PHILLY. </p>
</div>
<div class="section"><p>Because CUSTMAST is the file name used in the program, the <span class="cmdname">Override
with Database File (OVRDBF)</span> command must be used to override the
nonexistent CUSTMAST file with the DDM file INQ. (If the CUSTMAST file still
exists on the local server, the override is needed to access the central server's
primary file; without it, the local file is accessed.)</p>
</div>
<div class="section"><p>The figure below shows the same two servers accessing the centralized
CUSTMAST file by using their DDM files, each named INQ.</p>
</div>
<div class="section"><p>An alternative to this approach is to leave the CUSTMAST files
on the Chicago and Toronto servers and use them for nonessential inquiries,
such as name and address, and use the central CUSTMAST file in Philadelphia
for any changes. The CUSTMAST files on the Chicago and Toronto servers can
be changed periodically to the current level of the primary file on the Philadelphia
server.</p>
</div>
<div class="section"><p>This alternative method will be used in the next example.</p>
</div>
<div class="example"> <div class="fignone" id="rbae5apaex1__rbae5rmtinqs"><a name="rbae5apaex1__rbae5rmtinqs"><!-- --></a><span class="figcap">Figure 2. Two DDM servers doing remote inquiries</span><br /><img src="rsll112.gif" alt="This figure is described in the preceding text." /><br /></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5code.htm" title="The examples in this topic collection are based on representative application programs that might be used for processing data both on the local iSeries server and on one or more remote servers.">Examples: Code DDM-related tasks</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../rbam6/rbam6clmain.htm">Control language</a></div>
</div>
</div>
</body>
</html>