ibm-information-center/dist/eclipse/plugins/i5OS.ic.apiref_5.4.0.1/conIndexCons.htm

77 lines
4.8 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="User index considerations" />
<meta name="abstract" content="The performance of a user index is much better than that of a database file. However, before using a user index, you must know the functional differences between a user index and a database file." />
<meta name="description" content="The performance of a user index is much better than that of a database file. However, before using a user index, you must know the functional differences between a user index and a database file." />
<meta name="DC.Relation" scheme="URI" content="concept.htm" />
<meta name="DC.Relation" scheme="URI" content="../apis/jc1.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="conIndexCons" />
<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> User index considerations</title>
</head>
<body id="conIndexCons"><a name="conIndexCons"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1"> User index considerations</h1>
<div><p>The performance of a user index is much better than that of a database
file. However, before using a user index, you must know the functional differences
between a user index and a database file.</p>
<p>The contents of a database file are not affected by an abnormal system
end. On the other hand, the contents of a user index may become totally unusable
if the system ends abnormally. Therefore, you should not use a user index
if the information you want to store needs to remain without errors after
an abnormal system end.</p>
<p>If your system abnormally ends when you are removing or inserting a user
index entry, unpredictable results may occur. If you are inserting or removing
a user index entry and you should force the index entry to the disk unit using
one of the following:</p>
<ul><li>A user index created with the immediate update parameter set to 1 (affects
performance)</li>
<li>A modify index (MODIDX) MI instruction with the immediate update bit set
to 1</li>
<li>The set access state (SETACST) MI instruction</li>
</ul>
<p>If you do not force the index entry and the system abnormally ends, your
index will probably be damaged.</p>
<p>To determine if your last system power down was normal or abnormal, you
can check the system value QABNORMSW.</p>
<p>You will not get an error message if your index is damaged. The definition
of your index is usable; it is probably the data in your index that is bad.</p>
<p>You can log changes to a database file in a journal, and you can use the
journal to apply or remove those changes later. You can also use the journal
to audit who is using the database file. However, the system does not support
the journaling of indexes. As a result, user applications should log entries
in a journal to keep track of changes to the index, but you cannot update
the index using apply and remove journal entry functions. For more information
on journaling, see the Journal and Commit APIs.</p>
<p>Indexes support the storage of data that does not need to remain after
an abnormal system end. If an abnormal system end does occur, you must use
a backup copy of the index that was previously saved or create a new copy
of the index.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="concept.htm" title="Describes the underlying concepts that you need to understand to work effectively with APIs. Among the concepts covered are basic concepts, programming considerations, and terminology.">API concepts</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../apis/jc1.htm">Journal and Commit APIs</a></div>
</div>
</div>
</body>
</html>