Hitachi MK-96RD647-01 DatasetFindClose Function, DatasetError = datasetFindClose datasetHandle

Models: MK-96RD647-01

1 226
Download 226 pages 34.71 Kb
Page 164
Image 164

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-8shows the datasetFindNextFile arguments and return values.

Table 6-8

DatasetFindNextFile Function

 

 

 

 

 

Item

 

Value

Type

Description

 

 

 

 

Argument

datasetHandle

DATASET_HANDLE

The datasetHandle value returned by the preceding

 

 

 

 

datasetFindFirstFile function.

 

ffd

 

DATASET_FIND_DATA

Area where the dataset attribute information is stored.

 

 

 

 

 

Return value

0

 

 

Normal end

 

-1

 

 

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-9shows 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

 

 

 

 

 

 

 

 

6-10

 

 

Performing File Access Library (FAL) Operations

 

 

 

 

 

 

 

 

 

 

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

Page 164
Image 164
Hitachi MK-96RD647-01 manual DatasetFindClose Function, DatasetError = datasetFindNextFile datasetHandle, &ffd, Value