HP StorageWorks P9000 Data Exchange User Guide (T1620-96016, September 2010)

When the DatasetGetFileInformation function terminates successfully, it returns a value of 0.
If it terminates unsuccessfully, it returns a value of -1. To get the error code information, execute the
datasetGetLastError function (see Acquiring Error Information on page 127).
The DatasetGetFileInformation function has the following restriction:
The DatasetGetFileInformation function cannot be used on an open dataset. Use this
function before opening or after closing the dataset.
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 mainframe 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 47 on page 129 shows
the datasetFindFirstFile arguments and return values.
Table 47 DatasetFindFirstFile Function
DescriptionTypeValueItem
Path name (VolumeName:DatasetName
(VSN identification))
char *pathnameArgument
Attribute information (area where the
dataset attribute information is stored)
DATASET_FIND_DATA
ffd
Return value
Normal end
DATASET_HANDLE
datasetHandle
Abnormal end-1
When the datasetFindFirstFile function terminates successfully, it returns a handle that
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 Acquiring Error
Information on page 127). 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.
HP StorageWorks P9000 Data Exchange User Guide 129