109 lines
7.3 KiB
HTML
109 lines
7.3 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="concept" />
|
||
|
<meta name="DC.Title" content="Share existing record format descriptions in a database file" />
|
||
|
<meta name="abstract" content="A record format can be described once in either a physical or a logical file (except a join logical file) and can be used by many files. When you describe a new file, you can specify that the record format of an existing file is to be used by the new file." />
|
||
|
<meta name="description" content="A record format can be described once in either a physical or a logical file (except a join logical file) and can be used by many files. When you describe a new file, you can specify that the record format of an existing file is to be used by the new file." />
|
||
|
<meta name="DC.subject" content="sharing, record format descriptions that exist, record format, description, sharing existing, sharing existing record format" />
|
||
|
<meta name="keywords" content="sharing, record format descriptions that exist, record format, description, sharing existing, sharing existing record format" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafodescdds.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforcdfmtr.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforcdfmts.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="rbafosharf" />
|
||
|
<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>Share existing record format descriptions in a database file</title>
|
||
|
</head>
|
||
|
<body id="rbafosharf"><a name="rbafosharf"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Share existing record format descriptions in a database file</h1>
|
||
|
<div><p>A record format can be described once in either a physical or a
|
||
|
logical file (except a join logical file) and can be used by many files. When
|
||
|
you describe a new file, you can specify that the record format of an existing
|
||
|
file is to be used by the new file.</p>
|
||
|
<p>Sharing existing record format descriptions can help reduce the number
|
||
|
of DDS statements that you normally code to describe a record format in a
|
||
|
new file and can save auxiliary storage space.</p>
|
||
|
<p>The file originally describing the record format can be deleted without
|
||
|
affecting the files sharing the record format. After the last file using the
|
||
|
record format is deleted, the system automatically deletes the record format
|
||
|
description.</p>
|
||
|
<p>The following example shows the DDS for two files. The first file describes
|
||
|
a record format, and the second file shares the record format of the first
|
||
|
file:</p>
|
||
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
||
|
A R RECORD1 PFILE(CUSMSTP)
|
||
|
A CUST
|
||
|
A NAME
|
||
|
A ADDR
|
||
|
A SEARCH
|
||
|
A K CUST
|
||
|
A</pre>
|
||
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
||
|
A R RECORD1 PFILE(CUSMSTP)
|
||
|
A FORMAT(CUSMSTL)
|
||
|
A K NAME
|
||
|
A</pre>
|
||
|
<p>The first example shows file CUSMSTL, in which the fields <em>Cust</em>, <em>Name</em>, <em>Addr</em>,
|
||
|
and <em>Search</em> make up the record format. The <em>Cust</em> field is specified
|
||
|
as a key field.</p>
|
||
|
<p>The DDS in the second example shows file CUSTMSTL1,
|
||
|
in which the FORMAT keyword names CUSMSTL to supply the record format. The
|
||
|
record format name must be RECORD1, the same as the record format name shown
|
||
|
in the first example. Because the files are sharing the same format, both
|
||
|
files have fields <em>Cust</em>, <em>Name</em>, <em>Addr</em>, and <em>Search</em> in
|
||
|
the record format. In file CUSMSTL1, a different key field, <em>Name</em> is
|
||
|
specified.</p>
|
||
|
<div class="p">The following restrictions apply to shared record formats: <ul><li>A physical file cannot share the format of a logical file.</li>
|
||
|
<li>A join logical file cannot share the format of another file, and another
|
||
|
file cannot share the format of a join logical file.</li>
|
||
|
<li>A view cannot share the format of another file, and another file cannot
|
||
|
share the format of a view. (In the Structured Query Language (SQL), a <em>view</em> is
|
||
|
an alternative representation of data from one or more tables. It can include
|
||
|
all or some of the columns contained in the table or tables on which it is
|
||
|
defined.)</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>If the original record format is changed by deleting all related files
|
||
|
and creating the original file and all the related files again, it is changed
|
||
|
for all files that share it. If only the file with the original format is
|
||
|
deleted and re-created with a new record format, all files previously sharing
|
||
|
that file's format continue to use the original format.</p>
|
||
|
<p>If a logical file is defined but no field descriptions are specified and
|
||
|
the FORMAT keyword is not specified, the record format of the first physical
|
||
|
file (specified first on the PFILE keyword for the logical file) is automatically
|
||
|
shared. The record format name specified in the logical file must be the same
|
||
|
as the record format name specified in the physical file.</p>
|
||
|
<p>To find out if a file shares a format with
|
||
|
another file, use the RCDFMT parameter on the Display Database Relations (DSPDBR)
|
||
|
command. </p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbaforcdfmtr.htm">Record format relationships between physical and logical database files</a></strong><br />
|
||
|
When you change, add, and delete fields with the Change Physical File (CHGPF) command, a certain relationship exists between the physical and logical files that share the same record format.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbaforcdfmts.htm">Record format sharing limitation with physical and logical database files</a></strong><br />
|
||
|
You might encounter this record format sharing limitation when you are duplicating the same database object multiple times.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafodescdds.htm" title="When you describe a database file using data description specifications (DDS), you can describe information at the file, record-format, join, field, key, and select/omit levels.">Describe database files using DDS</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|