User Index Considerations

Related Information

ŸChapter 2 inSystthem API Reference, SC41-5801

APIs and the QUSRTOOL Library

QUSRTOOL, an optionally installable library, has several tools that use API include files (header files) for APIs. You can use the code as a m

programming. As of

Version

3

Release

6,

source

include

files

will

be

r

this

library. APARs

against the

offerings

in

QUSRTOOL

are

not

allowed.

Th

no support for enhancements or fixes to

the contents

of

the

library

o

complete reshipment

that

occurs

with

each

release. If

you

intend to

 

you

should copy the members

that you

plan

to

use

to

your

own

source

User Index Considerations

The performance of a user index is much better than that of a data However, before using a user index, you must know the functional diffe between a user index and a database file.

The contents

of

a

database file

are

not

affected

by

an

abnormal

sy

the other hand, the contents of

a

user

index

may

become

totally

unus

system

ends

abnormally. Therefore,

you

should not

use

a

user

index

if

mation

you want

to

store needs to

remain

without

errors

after an

abno

end.

 

 

 

 

 

 

 

 

 

 

 

 

 

If your system abnormally ends when you are removing or inserting a us entry, unpredictable results may occur. If you are inserting or removi index entry and you do not force the index entry to the disk unit following:

ŸA user index created with the immediate update parameter set to performance)

Ÿ A modify index (MODIDX) MI instruction with the immediate update bi

ŸThe set access state (SETACST) MI instruction

and the system abnormally ends, your index is probably damaged.

To determine if

your

last system

power

down

 

was

normal

or

abnormal,

you

check

the system

value

QABNORMSW.

 

 

 

 

 

 

 

 

 

You

will

not get an error message if your

index

is

damaged. The

def

index

is

usable;

it is probably

the data

in

your

index

that is

bad

You

can

log changes to a database file in

a journal, and you can

us

apply

 

or

remove those

changes later. You

can

also

use

the

journal

to

using

the database file. However, the system does not support the jo

indexes. As

a

result,

user

applications should log

entries in

a journal

of changes to the index,

but you

cannot update

the index

using apply

journal

entry

functions. For

more information on journaling, see the Journa

Commit

APIs

in

theSystem

API

Referencebook,

SC41-5801.

 

 

Indexes support the storage of data that does not need to remain a system end. If an abnormal system end does occur, you must use a ba of the index that was previously saved or create a new copy of th

2-30System API Programming V4R1

Page 50
Image 50
IBM Version 4 manual APIs and the Qusrtool Library, User Index Considerations, InSystthem API Reference, SC41-5801