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

89 lines
5.2 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="UNIQUE (Unique) keyword for physical and logical files" />
<meta name="abstract" content="Use this file-level keyword to specify that records with duplicate key values are not allowed within a member of this physical or logical file." />
<meta name="description" content="Use this file-level keyword to specify that records with duplicate key values are not allowed within a member of this physical or logical file." />
<meta name="DC.subject" content="UNIQUE (Unique) keyword" />
<meta name="keywords" content="UNIQUE (Unique) 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="tduniqu" />
<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, UNIQUE</title>
</head>
<body id="tduniqu"><a name="tduniqu"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">UNIQUE (Unique) keyword for physical and logical files</h1>
<div><p>Use this file-level keyword to specify that records with duplicate
key values are not allowed within a member of this physical or logical file.</p>
<div class="section"><p>You can specify whether null key values are
to be considered as duplicates using the parameter. Any insertions or additions
of new records, or updates to existing records, which might result in a duplicate
key, are rejected. The application program issuing the write or the update
operation receives an error message. When a workstation user is using data
file utility (DFU), a message is displayed at the workstation. A copy file
command that copies records with duplicate keys in this file is not completed.</p>
<div class="p">The
format of this keyword is: <pre>UNIQUE[(*INCNULL | *EXCNULL)]</pre>
The
parameter is optional. When specified, it determines whether null key values
cause duplicates. *INCNULL is the default and indicates to include null values
when determining duplicates. *EXCNULL, when specified, indicates to exclude
null values when determining duplicates.</div>
<p>When a logical file based on
a physical file has the UNIQUE keyword, the physical file member or members
cannot have duplicate key values.</p>
<p>When you specify the UNIQUE keyword
for a physical or logical file, you must specify the MAINT(*IMMED) parameter
value on the Create Physical File (CRTPF) or Create Logical File (CRTLF) command
that creates the file. This means that the access path is maintained immediately
when changes are made.</p>
<p>If you do not specify the UNIQUE
keyword, records with duplicate key values are sequenced in the order you
specify. If you specify the FIFO keyword, they are sequenced in first-in first-out
order. If you specify the LIFO keyword, they are sequenced in last-in first-out
order. If you specify the FCFO keyword, they are sequenced in first-changed
first-out order. If you do not specify FIFO, LIFO or FCFO, the order in which
the records are sequenced is not guaranteed.</p>
<p>You cannot specify the
UNIQUE keyword with the FIFO, LIFO, FCFO, or REFACCPTH keywords.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the UNIQUE keyword for a logical file.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A*
00020A* SAMPLE LOGICAL FILE (CUSMSTL)
00030A*
00040A UNIQUE
00050A R CUSREC PFILE(CUSMSTP)
00060A TEXT('Logical File Master Record')
00070A CUST
00080A NAME
00090A ADDR
00100A K CUST
A</pre>
</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>