ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakb_5.4.0.1/rzakbmstlpfile.htm

119 lines
6.9 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="PFILE (Physical File) keyword—logical files only" />
<meta name="abstract" content="Use this record-level keyword to identify the physical file(s) containing the data to be accessed through the record format that you are defining." />
<meta name="description" content="Use this record-level keyword to identify the physical file(s) containing the data to be accessed through the record format that you are defining." />
<meta name="DC.subject" content="PFILE (Physical File) keyword, Physical File (PFILE) keyword" />
<meta name="keywords" content="PFILE (Physical File) keyword, Physical File (PFILE) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="lpfile" />
<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>Physical and Logical Files, PFILE</title>
</head>
<body id="lpfile"><a name="lpfile"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">PFILE (Physical File) keyword—logical files only</h1>
<div><p>Use this record-level keyword to identify the physical file(s)
containing the data to be accessed through the record format that you are
defining.</p>
<div class="section"><div class="p">The format of the keyword is: <pre>PFILE([library-name/]physical-file-name [.32])</pre>
</div>
<p>The
PFILE keyword is required on every record format in a simple or multiple format
logical file. This keyword is similar to the JFILE keyword except that it
identifies this file as a simple or multiple format logical file; the PFILE
keyword is not allowed with the JFILE keyword. Up to 32 physical file names
can be specified on PFILE keywords in a logical file. If the maximum is being
used, 32 physical file names can be specified on one record format (using
one PFILE keyword) or 32 physical file names can be distributed among 32 record
formats; or, file names can be unevenly distributed among record formats.
In any case, the maximum number of physical file names allowed is 32. For
restrictions on specifying multiple physical files when creating a logical
file, see the appropriate high-level language manual.</p>
<p>For each physical-file-name,
a library-name is optional. If the library-name is omitted, the library list
(*LIBL) that is in effect at file creation time is used.</p>
<div class="p">If you specify
more than one physical file name for one record format in a multiple format
logical file, all fields in the record format for the logical file must exist
in all physical files specified. This type of file cannot be externally described
in RPG because it results in duplicate format names. If your program requires
access to fields that occur in one or more of the physical files specified
on the PFILE keyword, but not in all of them, you can do one of the following
tasks:<ul><li>Specify a join logical file. If you do this, use the JFILE keyword instead
of the PFILE keyword.</li>
<li>Specify a separate logical file record format that includes fields not
in the first physical file. <p>For instance, if FLD1 and FLD2 occur in physical
files PF1, PF2, and PF3, but FLD3 occurs only in PF3, you cannot specify FLD3
in a logical file record format based on PF1 and PF2. To provide access to
FLD3, either specify a second logical file record format that includes FLD3
or use a join logical file.</p>
<p>You cannot use a simple or multiple format
logical file to bring together into one record format fields from separate
physical files. Use a join logical file to accomplish this. A record read
through the use of a record format in a simple or multiple format logical
file can contain data from only one physical file, and a record written through
the use of a record format in a logical file can be stored only in one physical
file.</p>
</li>
</ul>
</div>
<p>Distributed data management (DDM) files are allowed on the PFILE
keyword only when the logical file is being created on a remote system.</p>
</div>
<div class="section"><h4 class="sectiontitle">Examples</h4><p>The following examples show how to specify
the PFILE keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 1</h4> <pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R LOGRCD1 PFILE(PF1)
A</pre>
<p>In this example, LOGRCD1 can use fields only in PF1.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 2</h4><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R LOGRCD2 PFILE(PF1 PF2)
A :
A :
00020A R LOGRCD3 PFILE(PF1 PF2 PF3)
A :
A :
A</pre>
<p>In this example, LOGRCD2 must use fields common to PF1,
and PF2, and LOGRCD3 must use fields common to PF1, PF2, and PF3.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 3</h4><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R LOGRCD4 PFILE(PF1)
A :
A :
00020A R LOGRCD5 PFILE(PF2)
A :
A :
00030A R LOGRCD6 PFILE(LIB1/PF6)
A</pre>
<p>In this example, LOGRCD4, LOGRCD5, and LOGRCD6 can have
unique fields. LOGRCD6 specifies a qualified physical-file name.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakbmstlfkeyw.htm" title="This topic lists valid keyword entries for describing physical and logical files. They are typed in positions 45 through 80 (functions).">Keyword entries for physical and logical files (positions 45 through 80)</a></div>
</div>
</div>
</body>
</html>