HP StorageWorks P9000 Data Exchange User Guide (T1620-96016, September 2010)
dataset. When the data is written into the dataset, multiple records are blocked within the extent
defined by the VTOC of the dataset.
Figure 78 Format Requirements for Writing Variable-Length Records
.
When the datasetPut function terminates successfully, it returns the length of the data entity written
to the dataset. If the datasetPut 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).
Closing a Dataset
datasetError = datasetClose (datasetHandle)
The datasetClose function closes the dataset specified by datasetHandle, which is returned by
the datasetOpen function. Table 44 on page 127 shows the datasetClose arguments and return
values.
Table 44 DatasetClose Function
DescriptionTypeValueItem
The datasetHandle value returned by the
datasetOpen function.
DATASET_HANDLEdatasetHandleArgument
Normal end0
Return value
Abnormal end-1
When the datasetClose 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).
Acquiring Error Information
datasetLastError = datasetGetLastError()
The datasetGetLastError function acquires the error code information for the most recent error.
Errors in FAL functions are defined in dataset.h (see Chapter 7 on page 149). Errors in UNIX are
defined by a standard error file (errno.h). Errors in Windows systems are defined by errno.h
HP StorageWorks P9000 Data Exchange User Guide 127