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

114 lines
8.5 KiB
HTML
Raw Permalink 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="ILE COBOL considerations for DDM" />
<meta name="abstract" content="ILE COBOL programs can refer to DDM files. Generally, DDM file names can be specified in ILE COBOL programming language anywhere a database file name can be specified, for both iSeries and non-iSeries target servers." />
<meta name="description" content="ILE COBOL programs can refer to DDM files. Generally, DDM file names can be specified in ILE COBOL programming language anywhere a database file name can be specified, for both iSeries and non-iSeries target servers." />
<meta name="DC.subject" content="limitations, ILE COBOL programming language, language considerations, high-level language (HLL), HLL (high-level language), SRCFILE parameter, SRCMBR parameter, command, CRTCBLPGM (Create COBOL Program), Create COBOL Program (CRTCBLPGM), command, CL, Create COBOL Program (CRTCBLPGM), COBOL program, creating, DDM file, ILE COBOL considerations, accessing, programming considerations, CL commands, SORT/MERGE operation, System/38, SORT/MERGE operation, restrictions, logical file, COPY statement, COPY statement, PRTFILE parameter, ILE COBOL programming language, ILE COBOL programming language, I/O operation, operation, input/output" />
<meta name="keywords" content="limitations, ILE COBOL programming language, language considerations, high-level language (HLL), HLL (high-level language), SRCFILE parameter, SRCMBR parameter, command, CRTCBLPGM (Create COBOL Program), Create COBOL Program (CRTCBLPGM), command, CL, Create COBOL Program (CRTCBLPGM), COBOL program, creating, DDM file, ILE COBOL considerations, accessing, programming considerations, CL commands, SORT/MERGE operation, System/38, SORT/MERGE operation, restrictions, logical file, COPY statement, COPY statement, PRTFILE parameter, ILE COBOL programming language, ILE COBOL programming language, I/O operation, operation, input/output" />
<meta name="DC.Relation" scheme="URI" content="rbae5plc.htm" />
<meta name="DC.Relation" scheme="URI" content="rbae5cobdir.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="rbae5cobolcon" />
<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 COBOL considerations for DDM</title>
</head>
<body id="rbae5cobolcon"><a name="rbae5cobolcon"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">ILE COBOL considerations for DDM</h1>
<div><p>ILE COBOL programs can refer to DDM files. Generally, DDM file
names can be specified in ILE COBOL 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 COBOL Program (CRTCBLPGM)</span> command:
<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 the <span class="cmdname">CRTCBLPGM</span> command. Or, if a member
name is specified, it must be the same as the DDM file name specified on the
SRCFILE parameter.</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 the <span class="cmdname">CRTCBLPGM</span> command.</li>
</ul>
</li>
<li>DDM file names can be specified as the input and output files for the
ILE COBOL SORT and MERGE operation. (The work file for this operation cannot
be a DDM file.)</li>
<li>A DDM file can be used in the ILE COBOL COPY statement when the DDS option
on that statement is used to copy one or all of the externally described record
formats from the remote file referred to by the DDM file into the program
being compiled. If this is done when 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 will 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 server'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>DDM file names can be specified on a COPY statement: <ul><li>If you do not specify the library name with the file name, the first file
found with that file name in the user's library list is used as the include
file.</li>
<li>If the target server is not an <span class="keyword">iSeries server</span> or
a <span class="keyword">System/38</span>, a DDM file name
can be specified as the include file on a COPY statement, but the member name
must be the same as the DDM file name.</li>
</ul>
</li>
<li>If the target server is a <span class="keyword">System/36™</span>,
ILE COBOL programming language cannot be used to open a DDM file for output
if the associated remote file has logical files built over it. For <span class="keyword">System/36</span> files with logical files, the
open operation (open output) will fail because ILE COBOL programming language
attempts to clear the file before using it.</li>
</ul>
</div>
<div class="section"><p>When an ILE COBOL program opens a DDM file on the
source server, the following statements can be used to perform I/O operations
on the remote file at the target server, for both <span class="keyword">iSeries</span> and
non-<span class="keyword">iSeries</span> targets: CLOSE,
DELETE, OPEN, READ, REWRITE, START, and WRITE.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbae5cobdir.htm">Direct file support with ILE COBOL</a></strong><br />
An <span class="keyword">iSeries server</span> does
not support direct files as one of its file types. However, an ILE COBOL program
on <span class="keyword">iSeries server</span> can specify that
a file be accessed as a <em>direct</em> file.</li>
</ul>
<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>