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

85 lines
5.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 4: Access a file on System/36" />
<meta name="abstract" content="This topic shows how the pseudocode program for the previous task can be changed so a MASTER file on the System/36 in Dallas can be accessed in the same way as the MASTER files on the iSeries servers and System/38 in Example 3." />
<meta name="description" content="This topic shows how the pseudocode program for the previous task can be changed so a MASTER file on the System/36 in Dallas can be accessed in the same way as the MASTER files on the iSeries servers and System/38 in Example 3." />
<meta name="DC.subject" content="accessing, files, System/36, file" />
<meta name="keywords" content="accessing, files, System/36, file" />
<meta name="DC.Relation" scheme="URI" content="rbae5code.htm" />
<meta name="DC.Relation" scheme="URI" content="rbae5ddsinfo.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="rbae5apaex4" />
<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 4: Access a file on System/36</title>
</head>
<body id="rbae5apaex4"><a name="rbae5apaex4"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">DDM example 4: Access a file on <span class="keyword">System/36</span></h1>
<div><p>This topic shows how the pseudocode program for the previous task
can be changed so a MASTER file on the <span class="keyword">System/36™</span> in
Dallas can be accessed in the same way as the MASTER files on the <span class="keyword">iSeries™ server</span>s and <span class="keyword">System/38™</span> in
Example 3.</p>
<div class="section"><p>Assume that either you have pass-through to the <span class="keyword">System/36</span>,
or that an operator at the <span class="keyword">System/36</span> can
make changes, if necessary, on the <span class="keyword">System/36</span> for
you.</p>
</div>
<div class="section"><p>The following command is issued on the server in Philadelphia:
</p>
<pre>CRTDDMF FILE(PGMLIB/DALFILE) RMTFILE(MASTER)
RMTLOCNAME(DAL) ACCMTH(*KEYED)</pre>
</div>
<div class="section"><p>Because the remote file referred to by the DDM file named DALFILE
is on a <span class="keyword">System/36</span>, either of
two things must be done: </p>
<ul><li>The record format of the remote file must be described in the program;
that is, it must be a program-described file.</li>
<li>The program must be compiled with the program referring to a local <span class="keyword">iSeries</span> file instead of the <span class="keyword">System/36</span> file. This local file must
have the same record format name as the DDM file name. Note that the local
file need not contain any data records.</li>
</ul>
</div>
<div class="section"><p>Here is a sample of the pseudocode to accomplish
the task:</p>
<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="rbae5apaex4__thd"><a name="rbae5apaex4__thd"><!-- --></a>DECLARE CHIFILE, TORFILE, NYCFILE, DALFILE INPUT
Open CHIFILE, TORFILE, NYCFILE and DALFILE
LOOP: Show a display asking for ITEMNO
Read ITEMNO from the display
Read record from CHIFILE with the key ITEMNO
Read record from TORFILE with the key ITEMNO
Read record from NYCFILE with the key ITEMNO
Read record from DALFILE with the key ITEMNO
Write all QOH values to the display
If not function key, go to LOOP
Close CHIFILE, TORFILE, NYCFILE and DALFILE
END</pre>
</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="relref"><strong>Related reference</strong><br />
<div><a href="rbae5ddsinfo.htm" title="Data description specifications (DDS), which is used to externally describe the fields and record formats, can also be used with DDM to describe the file and record formats of a remote file.">Data description specifications considerations for DDM</a></div>
</div>
</div>
</body>
</html>