Read data, Arguments, types, and descriptions for read data – HP XP P9500 Storage User Manual
Page 139

void *memptr;
/* global memory area */
long err,datasetError;
/* global err information */
int retcode;
retcode = dataset_AllocGlobal(&memptr, &err, malloc, free);
:
datasetError = dataset_Open(memptr, &err,”
HYPERLINK “\\\\.\\PHYSICALDRIVE1”
\\.\PHYSICALDRIVE1
,”DSN001
, ”3390-3A”,”r”);
:
datasetError=dataset_Close(memptr, &err);
retcode = dataset_FreeGlobal(&memptr, &err);
Read Data
•
Format: reclen = dataset_Get(global, g_error, buf, buflen)
reclen= dataset_Get2(global, g_error, buf, buflen)
Table 54 Arguments, Types, and Descriptions for Read Data
Description
Type
Argument
Global memory area
void*
global
An error information stored area
long*
g_error
Read buffer
char*
buf
Data length transferred to buffer
long*
buflen
Data length read to buffer
long
reclen
Return value:
Abnormal end
-1
NOTE:
This function provides the ability to read a record of a previously opened dataset out to a buffer.
Transferred data is real data only. For further information, see “
•
Argument:
• global: Global memory area (specify a global memory area gotten by dataset_AllocG-
lobal
).
• g_error: Specify an address to store FAL error code.
• buf: Specify a buffer to store read data.
• buflen: Specify the buffer size.
•
Return Value:
• For dataset_Get():
• When this function ends normally, reclen (record length) is returned. (1 record
length
32760).
• When this function ends abnormally, “- 1” is returned.
• When this function detects the EOF, “0” is returned.
• For dataset_Get2():
HP StorageWorks P9000 Data Exchange User Guide
139