HP XP20000XP24000 Disk Array User Manual
Page 163
Performing File Access Library (FAL) Operations
6-9
Hitachi USP V Cross-OS File Exchange User’s Guide
Acquiring Attribute Information for Multiple Datasets
A combination of the datasetFindFirstFile, datasetFindNextFile, and
datasetFindClose functions is used to acquire attribute information for more
than one dataset in the specified z/OS volume.
1. datasetHandle = datasetFindFirstFile (pathname, &ffd)
The datasetFindFirstFile function acquires the attribute information for
the first dataset in the volume specified by pathname and returns the
data into ffd. Table 6-7 shows the datasetFindFirstFile arguments and
return values.
Table 6-7
DatasetFindFirstFile Function
Item Value
Type
Description
Argument
pathname
ffd
char *
DATASET_FIND_DATA
VSN
VSN = 6-character volser.
Volume must be listed in volume definition file.
Area where the dataset attribute information is stored.
Return value datasetHandl
e
-1
DATASET_HANDLE
Normal end
Error end
When the datasetFindFirstFile function terminates successfully, it returns
a handle which identifies the dataset for which the attribute information
was acquired. The datasetHandle information is used as the argument of
the subsequent functions datasetFindNextFile and datasetFindClose.
Do not change the datasetHandle value returned by this function. If the
datasetFindFirstFile 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
datasetFindFirstFile function does not find any datasets in the VTOC, the
datasetGetLastError function will return
DATASET_ERROR_END_NO_DATASET.
The datasetFindFirstFile function has the following restrictions:
–
The datasetFindFirstFile 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 datasetFindFirstFile function,
the dataset cannot be opened until after the datasetFindClose function
is called.