Hitachi MK-96RD647-01 manual Closing a Dataset, Acquiring Error Information, DatasetClose Function

Models: MK-96RD647-01

1 226
Download 226 pages 34.71 Kb
Page 161
Image 161

Closing a Dataset

datasetError = datasetClose (datasetHandle)

The datasetClose function closes the dataset specified by datasetHandle, which is returned by the datasetOpen function. Table 6-4shows the datasetClose arguments and return values.

Table 6-4 DatasetClose Function

Item

Value

Type

 

Description

 

 

 

 

 

Argument

datasetHandl

DATASET_HANDLE

 

The datasetHandle value returned by the datasetOpen

 

e

 

 

function.

 

 

 

 

 

Return value

0

 

 

Normal end

 

-1

 

 

Error end

 

 

 

 

 

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 section Acquiring Error Information).

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 Appendix C). Errors in UNIX are defined by a standard error file (errno.h). Errors in Windows 2000/2003/Windows NT systems are defined by errno.h attached with Microsoft Visual C++. Table 6-5shows the datasetClose arguments and return values.

Table 6-5 DatasetGetLastError Function

Item

Value

 

Type

Description

 

 

 

 

 

Argument

none

 

 

 

 

 

 

Return value

datasetLastError

Long

 

Error code

 

 

 

 

 

Performing File Access Library (FAL) Operations

6-7

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

Page 161
Image 161
Hitachi MK-96RD647-01 Closing a Dataset, Acquiring Error Information, DatasetClose Function, DatasetGetLastError Function