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

70 lines
4.4 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="Example 1: Change a physical file description and attributes" />
<meta name="abstract" content="This example shows how to create a new physical file with the same name in a different library." />
<meta name="description" content="This example shows how to create a new physical file with the same name in a different library." />
<meta name="DC.subject" content="physical file, example, changing, attributes of physical files, descriptions of physical files" />
<meta name="keywords" content="physical file, example, changing, attributes of physical files, descriptions of physical files" />
<meta name="DC.Relation" scheme="URI" content="rbafochgpfda.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="rbafochgpfdaex1" />
<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>Example 1: Change a physical file description and attributes</title>
</head>
<body id="rbafochgpfdaex1"><a name="rbafochgpfdaex1"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example 1: Change a physical file description and attributes</h1>
<div><p>This example shows how to create a new physical file with the same
name in a different library.</p>
<div class="section"> <ol><li>Create a new physical file with a different record format in a library
different from the library the old physical file is in. The name of the new
file should be the same as the name of the old file. (The old physical file
FILEPFC is in library LIBB and has two members, MBRC1 and MBRC2.) <pre>CRTPF FILE(NEWLIB/FILEPFC) MAXMBRS(2)...</pre>
</li>
<li>Copy the members of the old physical file to the new physical file. The
members in the new physical file are automatically named the same as the members
in the old physical file because TOMBR(*FROMMBR) and FROMMBR(*ALL) are specified. <pre>CPYF FROMFILE(LIBB/FILEPFC) TOFILE(NEWLIB/FILEPFC)
FROMMBR(*ALL) TOMBR(*FROMMBR)
FMTOPT(*MAP *DROP) MBROPT(*ADD)</pre>
</li>
<li>Describe and create a new logical file in a library different from the
library the old logical file is in. The new logical file name should be the
same as the old logical file name. You can use the FORMAT keyword to use the
same record formats as in the current logical file if no changes
need to be made to the record formats. You can also use the Create Duplicate
Object (CRTDUPOBJ) command to create another logical file from the old logical
file FILELFC in library LIBB. <pre>CRTLF FILE(NEWLIB/FILELFC)</pre>
</li>
<li>Delete the old logical and physical files. <pre>DLTF FILE(LIBB/FILELFC)
DLTF FILE(LIBB/FILEPFC)</pre>
</li>
<li>Move the newly created files to the original library by using the following
commands:<pre>MOVOBJ OBJ(NEWLIB/FILELFC) OBJTYPE(*FILE) TOLIB(LIBB)
MOVOBJ OBJ(NEWLIB/FILEPFC) OBJTYPE(*FILE) TOLIB(LIBB)</pre>
</li>
</ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafochgpfda.htm" title="Sometimes when you make a change to a physical file description and then re-create the file, the level identifier can change. If the level identifier changes, you can either compile the program again or avoid recompiling using a logical file.">Change a physical file description and attributes</a></div>
</div>
</div>
</body>
</html>