HP StorageWorks P9000 Data Exchange User Guide (T1620-96016, September 2010)
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
DescriptionTypeArgument
Global memory areavoid*global
An error information stored arealong*g_error
Read bufferchar*buf
Data length transferred to bufferlong*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 “Reading Data” on page 125.
• 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