beautypg.com

HP XP20000XP24000 Disk Array User Manual

Page 164

background image

6-10

Performing File Access Library (FAL) Operations

Hitachi USP V Cross-OS File Exchange User’s Guide

2. datasetError = datasetFindNextFile (datasetHandle, &ffd)

The datasetFindNextFile function acquires the attribute information for

the next dataset in the volume specified by datasetHandle and returns
the data into ffd. This function can be repeated until “no dataset found” is
returned, or until the user application determines that no more information

is needed. Table 6-8 shows the datasetFindNextFile arguments and
return values.

Table 6-8

DatasetFindNextFile Function

Item Value

Type

Description

Argument

datasetHandle

ffd

DATASET_HANDLE

DATASET_FIND_DATA

The datasetHandle value returned by the preceding
datasetFindFirstFile function.

Area where the dataset attribute information is stored.

Return value 0

-1

Normal end

Error end, or no dataset found

When the datasetFindNextFile function terminates successfully, it returns

a value of 0. If this function terminates unsuccessfully, it returns a value of
-1. To get the error code information, execute the datasetGetLastError
function (see section Acquiring Error Information). For example, when the
datasetFindNextFile function cannot find the next dataset in the VTOC,

the datasetGetLastError function will return
DATASET_ERROR_END_OF_VTOC.
The datasetFindNextFile function has the following restrictions:

The datasetFindNextFile function cannot be used on an open dataset.
Use this function before opening or after closing the dataset.

After a dataset has been accessed by the datasetFindNextFile function,
the dataset cannot be opened until after the datasetFindClose function
is called.

The datasetFindFirstFile function must be called prior to
datasetFindNextFile.

3. datasetError = datasetFindClose (datasetHandle)

The datasetFindClose function terminates the acquisition of attribute

information by the datasetFindFirstFile and datasetFindNextFile

functions and closes the dataset. The datasetFindFirstFile function must
be called prior to datasetFindClose. Table 6-9 shows the
datasetFindClose arguments and return values.

Table 6-9

DatasetFindClose Function

Item Value

Type

Description

Argument datasetHandle

DATASET_HANDLE

The

datasetHandle value returned by the preceding

datasetFindFirstFile function.

Return value 0

Normal end