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

113 lines
7.9 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="Examples: Access iSeries DDM remote files (iSeries-to-iSeries)" />
<meta name="abstract" content="The examples show how access to a DDM file becomes an indirect reference (by using DDM) to the actual file on some other server. These examples are iSeries-to-iSeries examples." />
<meta name="description" content="The examples show how access to a DDM file becomes an indirect reference (by using DDM) to the actual file on some other server. These examples are iSeries-to-iSeries examples." />
<meta name="DC.subject" content="accessing, example, -to-, iSeries, system, accessing files, remote, remote system, create DDM file, example, DDM file, create file, example, copying, file, example, allocating, file, allocating, example, overriding, files, example, displaying, files, example, file description, with DSPFD command" />
<meta name="keywords" content="accessing, example, -to-, iSeries, system, accessing files, remote, remote system, create DDM file, example, DDM file, create file, example, copying, file, example, allocating, file, allocating, example, overriding, files, example, displaying, files, example, file description, with DSPFD command" />
<meta name="DC.Relation" scheme="URI" content="rbae5fac.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="rbae5exiseries" />
<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: Access iSeries DDM
remote files (iSeries-to-iSeries)</title>
</head>
<body id="rbae5exiseries"><a name="rbae5exiseries"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: Access <span class="keyword">iSeries</span> DDM
remote files (<span class="keyword">iSeries</span>-to-<span class="keyword">iSeries</span>)</h1>
<div><p>The examples show how access to a DDM file becomes an indirect
reference (by using DDM) to the actual file on some other server. These examples
are <span class="keyword">iSeries™</span>-to-<span class="keyword">iSeries</span> examples.</p>
<div class="section"> <div class="note"><span class="notetitle">Note:</span> All of these examples assume that the DDM file on the local <span class="keyword">iSeries server</span> is named DDMLIB/RMTCAR and
that it is associated with a remote file named SALES/CAR on an <span class="keyword">iSeries server</span> in
Chicago.</div>
</div>
<div class="section"><h4 class="sectiontitle">Create a DDM file to access a remote file</h4> <pre>CRTDDMF FILE(DDMLIB/RMTCAR) RMTFILE(SALES/CAR)
RMTLOCNAME(CHICAGO) TEXT('Chicago file SALES/CAR')</pre>
<p>This
command creates a DDM file named RMTCAR and stores it in the DDMLIB library
on the local server. The remote file to be accessed is the CAR database file
in the SALES library on the Chicago server. (The remote file is <em>not</em> accessed
at the time the <span class="cmdname">Create DDM File (CRTDDMF)</span> command is used
to create the DDM file. The existence of the file SALES/CAR is not checked
when the DDM file is created.) Later, when the DDM file is accessed by a
local program, the remote location CHICAGO is used by DDM to access the SALES/CAR
file on the Chicago server.</p>
</div>
<div class="section"><h4 class="sectiontitle">Copy a local file to a remote file</h4><pre>CPYF FROMFILE(QGPL/AUTO) TOFILE(DDMLIB/RMTCAR)</pre>
<p>This
command copies the data from the AUTO file in the QGPL library on the local
server into a remote file named SALES/CAR on the Chicago server, by using
the DDM file DDMLIB/RMTCAR.</p>
</div>
<div class="section"><h4 class="sectiontitle">Allocate a remote file and member for use</h4><pre>ALCOBJ OBJ((DDMLIB/RMTCAR *FILE *EXCL))</pre>
<div class="p">The <span class="cmdname">Allocate Object (ALCOBJ)</span> command is used to allocate (lock) both
the DDM file (RMTCAR) on the source server and the first member of the remote
file (as well as the file itself) on the target server. In effect, the command
<pre>ALCOBJ OBJ((SALES/CAR *FILE *EXCL *FIRST))</pre>
is
run on the target server.</div>
</div>
<div class="section"><h4 class="sectiontitle">Override a local file with a DDM file</h4><pre>OVRDBF FILE(FILEA) TOFILE(DDMLIB/RMTCAR)
POSITION(*RRN 3000)</pre>
<p>This command overrides the database file
FILEA with the DDM file RMTCAR, stored in the DDMLIB library. Both files are
on the source server. Whatever remote file is identified in the DDM file (in
this case, SALES/CAR on the Chicago system) is the file actually used by the
source server program. When the remote file is opened, the first record to
be accessed is record 3000.</p>
</div>
<div class="section"><h4 class="sectiontitle">Display records in a remote file</h4><pre>DSPPFM FILE(DDMLIB/RMTCAR)</pre>
<p>This
command displays the records in the first member of the remote file SALES/CAR,
which is associated with the DDM file DDMLIB/RMTCAR.</p>
</div>
<div class="section"><h4 class="sectiontitle">Display the object description of a DDM file</h4><pre>DSPOBJD OBJ(DDMLIB/RMTCAR) OBJTYPE(*FILE)</pre>
<p>This
command displays, on the local server, the object description of the RMTCAR
DDM file. No reference is made by this command to the associated remote file
on the Chicago server.</p>
</div>
<div class="section"><h4 class="sectiontitle">Display the file description of a DDM file</h4><pre>DSPFD FILE(DDMLIB/RMTCAR) TYPE(*ATR) FILEATR(*DDM)
SYSTEM(*LCL)</pre>
<p>This command displays, on the source server,
the file description of the DDM file named RMTCAR in the DDMLIB library. As
indicated by the TYPE parameter, the attributes of the DDM file are displayed.
Only the DDM file's attributes are displayed because FILEATR(*DDM) is specified.</p>
<p>Because
SYSTEM(*LCL) is specified, the attributes of the DDM file are displayed and
the remote server is not accessed. If SYSTEM(*RMT) is specified, the attributes
of the associated remote file are displayed. If *RMT or *ALL is specified,
the remote server is accessed to get the attributes of the remote file.</p>
</div>
<div class="section"><h4 class="sectiontitle">Delete a DDM file</h4><pre>DLTF FILE(DDMLIB/RMTCAR) SYSTEM(*LCL)</pre>
<p>This
command deletes the DDM file on the local server. Again, no reference is made
to the associated SALES/CAR file on the Chicago server. If SYSTEM(*RMT) or
SYSTEM(*FILETYPE) is specified, SALES/CAR on the Chicago server would be deleted.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5fac.htm" title="These topics describe the types of files supported by an iSeries server, when the DDM file and remote file must exist, and how to specify the names of remote files. Also included are examples and considerations for iSeries-to-iSeries and iSeries-to-System/36 file accessing.">Access files with DDM</a></div>
</div>
</div>
</body>
</html>