ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafologfm.htm

126 lines
7.6 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="concept" />
<meta name="DC.Title" content="Define logical file members" />
<meta name="abstract" content="You can define members in logical files to separate the data into logical groups. The logical file member can be associated with one or several physical file members." />
<meta name="description" content="You can define members in logical files to separate the data into logical groups. The logical file member can be associated with one or several physical file members." />
<meta name="DC.subject" content="logical file member, member, logical file" />
<meta name="keywords" content="logical file member, member, logical file" />
<meta name="DC.Relation" scheme="URI" content="rbafocrlof.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafologfm" />
<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>Define logical file members</title>
</head>
<body id="rbafologfm"><a name="rbafologfm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Define logical file members</h1>
<div><p>You can define members in logical files to separate the data into
logical groups. The logical file member can be associated with one or several
physical file members.</p>
<p>The following chart illustrates this concept:</p>
<br /><img src="rbafo506.gif" alt="Logical file members" /><br /><p>The record formats used with all logical members in a logical file must
be defined in data description specifications (DDS) when the file is created.
If new record formats are needed, another logical file or record format must
be created.</p>
<p>The attributes
of an access path are determined by the information specified in DDS and on
commands when the logical file is created. The selection of data members is
specified in the DTAMBRS parameter on the Create Logical File (CRTLF) and
Add Logical File Member (ADDLFM) commands.</p>
<p>When a logical file is defined, the physical files used by the logical
file are specified in DDS by the record-level PFILE or JFILE
keyword. If multiple record formats are defined in DDS, a PFILE keyword must
be specified for each record format. You can specify one or more physical
files for each PFILE keyword.</p>
<p>When a logical file is created
or a member is added to the file, you can use the DTAMBRS parameter on the
CRTLF or the ADDLFM command to specify which members of the physical files
used by the logical file are to be used for data. *NONE can be specified as
the physical file member name if no members from a physical file are to be
used for data.</p>
<p>In the following example, the logical file has two record formats defined:</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A
00010A R LOGRCD2 PFILE(PF1 PF2)
A .
A .
A .
00020A R LOGRCD3 PFILE(PF1 PF2 PF3)
A .
A .
A .
A</pre>
<div class="p">If the DTAMBRS parameter is specified on the CRTLF or ADDLFM command as
in the following example: <pre>DTAMBRS((PF1 M1) (PF2 (M1 M2)) (PF1 M1) (PF2 (*NONE)) (PF3 M3))</pre>
</div>
<p>Record format LOGRCD2 is associated with physical file member M1 in PF1
and M1 and M2 in file PF2. Record format LOGRCD3 is associated with M1 in
PF1 and M3 in PF3. No members in PF2 are associated with LOGRCD3. If the same
physical file name is specified on more than one PFILE keyword, each occurrence
of the physical file name is handled as a different physical file.</p>
<p>If a library name is not specified for the file on the PFILE keyword, the
library list is used to find the physical file when the logical file is created.
The physical file name and the library name then become part of the logical
file description. The physical file names and the library names specified
on the DTAMBRS parameter must be the same as those stored in the logical file
description.</p>
<p>If a file name is not qualified by a library name on the DTAMBRS parameter,
the library name defaults to *CURRENT, and the system uses the library name
that is stored in the logical file description for the respective physical
file name. This library name is either the library name that was specified
for the file on the PFILE DDS keyword or the name of the library in which
the file was found using the library list when the logical file was created.</p>
<div class="p">When you add a member to a logical file, you can specify data members as
follows: <ul><li>Specify no associated physical file members (DTAMBRS (*ALL) default).
The logical file member is associated with all the physical file members of
all physical files in all the PFILE keywords specified in the logical file
DDS.</li>
<li>Specify the associated physical file members (DTAMBRS parameter). If you
do not specify library names, the logical file determines the libraries used.
When more than one physical file member is specified for a physical file,
the member names should be specified in the order in which records are to
be retrieved when duplicate key values occur across those members. If you
do not want to include any members from a particular physical file, either
do not specify the physical file name or specify the physical file name and
*NONE for the member name. This method can be used to define a logical file
member that contains a subset of the record formats defined for the logical
file.</li>
</ul>
</div>
<div class="p">You can use the Create Logical File (CRTLF) command to create the first
member when you create the logical file. Subsequent members must be added
using the Add Logical File Member (ADDLFM) command. However, if you are going
to add more members, you must specify more than 1 for the MAXMBRS parameter
on the CRTLF command. The following example of adding a member to a logical
file uses the CRTLF command. <pre>CRTLF FILE(DSTPRODLB/ORDHDRL)
MBR(*FILE) DTAMBRS(*ALL)
TEXT('Order header logical file')</pre>
</div>
<p>*FILE is the default for the MBR parameter and means that the name of the
member is the same as the name of the file. All the members of the associated
physical file (ORDHDRP) are used in the logical file (ORDHDRL) member. The
text description is the text description of the member.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafocrlof.htm" title="This topic shows how to create a logical file using data description specifications (DDS).">Create a logical file</a></div>
</div>
</div>
</body>
</html>