109 lines
9.1 KiB
HTML
109 lines
9.1 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="ILE RPG considerations for DDM" />
|
|
<meta name="abstract" content="ILE RPG programs and automatic report programs can both refer to DDM files. Generally, DDM file names can be specified in ILE RPG programming language anywhere a database file name can be specified, for both iSeries and non-iSeries target servers." />
|
|
<meta name="description" content="ILE RPG programs and automatic report programs can both refer to DDM files. Generally, DDM file names can be specified in ILE RPG programming language anywhere a database file name can be specified, for both iSeries and non-iSeries target servers." />
|
|
<meta name="DC.subject" content="ILE RPG programming language, considerations, limitations, language considerations, high-level language (HLL), HLL (high-level language), DDM file, ILE RPG considerations, command, CRTRPGPGM (Create ILE RPG/400 Program), Create ILE RPG/400 Program (CRTRPGPGM), command, CL, Create ILE RPG/400 Program (CRTRPGPGM), ILE RPG program, creating, CRTRPTPGM (Create Auto Report Program), Create Auto Report Program (CRTRPTPGM), command, CL, CRTRPTPGM (Create Auto Report Program), Create Auto Report Program (CRTRPTPGM), auto report program, SRCFILE parameter, SRCFILE parameter, ILE RPG programming language, ILE RPG programming language, SRCMBR parameter, SRCMBR parameter, OUTFILE parameter, OUTMBR parameter, OUTMBR (Output Member) parameter, PRTFILE parameter, PRTFILE parameter, accessing, ILE RPG considerations, source file requirements, restrictions, /COPY statement, CL commands, ADDROUT file, file" />
|
|
<meta name="keywords" content="ILE RPG programming language, considerations, limitations, language considerations, high-level language (HLL), HLL (high-level language), DDM file, ILE RPG considerations, command, CRTRPGPGM (Create ILE RPG/400 Program), Create ILE RPG/400 Program (CRTRPGPGM), command, CL, Create ILE RPG/400 Program (CRTRPGPGM), ILE RPG program, creating, CRTRPTPGM (Create Auto Report Program), Create Auto Report Program (CRTRPTPGM), command, CL, CRTRPTPGM (Create Auto Report Program), Create Auto Report Program (CRTRPTPGM), auto report program, SRCFILE parameter, SRCFILE parameter, ILE RPG programming language, ILE RPG programming language, SRCMBR parameter, SRCMBR parameter, OUTFILE parameter, OUTMBR parameter, OUTMBR (Output Member) parameter, PRTFILE parameter, PRTFILE parameter, accessing, ILE RPG considerations, source file requirements, restrictions, /COPY statement, CL commands, ADDROUT file, file" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbae5plc.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="rbae5rpgcon" />
|
|
<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>ILE RPG considerations for DDM</title>
|
|
</head>
|
|
<body id="rbae5rpgcon"><a name="rbae5rpgcon"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">ILE RPG considerations for DDM</h1>
|
|
<div><p>ILE RPG programs and automatic report programs can both refer to
|
|
DDM files. Generally, DDM file names can be specified in ILE RPG programming
|
|
language anywhere a database file name can be specified, for both <span class="keyword">iSeries™</span> and non-<span class="keyword">iSeries</span> target
|
|
servers. </p>
|
|
<div class="section"><ul><li>DDM file names can be specified on the <span class="cmdname">Create RPG Program (CRTRPGPGM)</span> and <span class="cmdname">Create
|
|
Auto Report Program (CRTRPTPGM)</span> commands: <ul><li>To access remote files containing source statements, on an <span class="keyword">iSeries server</span> or
|
|
a non-<span class="keyword">iSeries server</span>, a DDM file
|
|
name can be specified on the SRCFILE parameter, and a member name can be specified
|
|
on the SRCMBR parameter. <ul><li>For <span class="keyword">iSeries</span> or <span class="keyword">System/38™</span> target servers, a remote <span class="keyword">iSeries</span> or <span class="keyword">System/38</span> source
|
|
file (and, optionally, member) can be accessed in the same manner as a local
|
|
source file and member.</li>
|
|
<li>For non-<span class="keyword">iSeries</span> target
|
|
servers, a remote source file can be accessed if both the PGM and SRCMBR parameter
|
|
defaults are used on either command. Or, if a member name is specified, it
|
|
must be the same as the DDM file name specified on the SRCFILE parameter.
|
|
(The same is true for member names specified either on the /COPY statement
|
|
of the input specifications used to create an automatic report program or
|
|
as used by the compiler to include source specifications.)</li>
|
|
</ul>
|
|
</li>
|
|
<li>To place the compiler listing in a database file on a target server, a
|
|
DDM file name can be specified on the PRTFILE parameter of either command.</li>
|
|
</ul>
|
|
</li>
|
|
<li>A DDM file name and member name can be specified on the OUTFILE and OUTMBR
|
|
parameters of the <span class="cmdname">CRTRPTPGM</span> command, but before the output
|
|
produced by the command can be stored in the remote file referred to by the
|
|
DDM file, the remote file must already exist. Also, as with local files, the
|
|
record format of the remote file must match the required OUTFILE parameter
|
|
format. Generally, this means that the target server must be an <span class="keyword">iSeries server</span> or
|
|
a <span class="keyword">System/38</span>.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>When an ILE RPG program opens a DDM file on the source server,
|
|
the following types of I/O operations can be performed on the remote file
|
|
at the target server, for both <span class="keyword">iSeries</span> and
|
|
non-<span class="keyword">iSeries</span> targets: CHAIN,
|
|
CLOSE, DELET, EXCPT, FEOD, OPEN, READ, READE, READP, SETGT, SETLL, UPDAT,
|
|
and WRITE.</p>
|
|
</div>
|
|
<div class="section"><p>Other considerations are:</p>
|
|
<ul><li>If the DDM file is declared in the program to be externally described,
|
|
the ILE RPG compiler copies the external descriptions of the remote file referred
|
|
to into the program at compile time. However, if the remote file
|
|
is not on an <span class="keyword">iSeries server</span> or a <span class="keyword">System/38</span>, the field declares for the
|
|
record descriptions do not have meaningful names. Instead, all of the field
|
|
names are declared as F<em>nnnnn</em> and the key fields are declared as K<em>nnnnn</em>.
|
|
<p>A recommended method for describing remote files, when the target is not
|
|
an <span class="keyword">iSeries server</span> or a <span class="keyword">System/38</span>,
|
|
is to have the data description specifications (DDS) on the local server and
|
|
enter a <span class="cmdname">Create Physical File (CRTPF)</span> command or a <span class="cmdname">Create
|
|
Logical File (CRTLF)</span> command on the local server. Compile the program
|
|
using the local file name. Ensure that the remote system's file has the corresponding
|
|
field types and field lengths.</p>
|
|
<p>To access the remote file, use the <span class="cmdname">Override
|
|
with Database File (OVRDBF)</span> command preceding the program, for example:</p>
|
|
<pre>OVRDBF FILE(PGMFIL) TOFILE(DDMFIL) LVLCHK(*NO)</pre>
|
|
</li>
|
|
<li>A DDM file is also valid as the file specified in the ILE RPG program
|
|
that will be used implicitly in the ILE RPG logic cycle.</li>
|
|
<li>A record format name, if used, must match the DDM file name when the target
|
|
server is not an <span class="keyword">iSeries server</span> or
|
|
a <span class="keyword">System/38</span>.</li>
|
|
<li>An ADDROUT file created on a <span class="keyword">System/36™</span> cannot
|
|
be used on an <span class="keyword">iSeries server</span>. <span class="keyword">iSeries</span> <span class="keyword">System/36</span>-Compatible
|
|
RPG II uses 3-byte ADDROUT files, and ILE RPG programming language on an <span class="keyword">iSeries server</span> and <span class="keyword">System/38</span> uses
|
|
4-byte ADDROUT files.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5plc.htm" title="DDM is supported by these iSeries languages.">Programming language considerations for DDM</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |