Write data, Arguments, types, and descriptions for write data – HP XP P9500 Storage User Manual

Page 140

Advertising
background image

• When this function ends normally, reclen (record length) is returned. (0 record

length

32760).

• When this function ends abnormally, “- 1” is returned.
• When this function detects EOF, “DATASET_ERROR_END_OF_FILE” is returned.

NOTE:

When “- 1” is returned, see the content of g_error for error code details. For further
information, see

Chapter 7

on page 149.

Write Data

Format: recren= dataset_ Put(global, g_error, buf, buflen)

recren= dataset_ Put2(global, g_error, buf, buflen)

Table 55 Arguments, Types, and Descriptions for Write Data

Description

Type

Argument

Global memory area

void

1

global

An error information stored area

long

1

g_error

Read buffer

char

1

buf

Data length transferred to buffer

long

1

buflen

Data length read to buffer

long

1

reclen

Return value:

Abnormal end

-1

1

When buflen is “0”, the dataset_Put function has ended abnormally, but the dataset_Put2 function ends normally.

(It is possible to handle 0 data.)

When a full data error occurs, the return value of dataset_Put2 is “- 1”, but the return value of
dataset_Put

is “Y”. G_error is “- 50”.

This function writes a record of the previous opened dataset to a buffer. For variable length record
formats, this function writes real data to a buffer with record length. For more detail, 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 write data.
• buflen: Specify the buffer size.

Return Value: When this function ends normally, reclen (record length) is returned. When this
function ends abnormally, “- 1” is returned. When “- 1” is returned, see the contents of
g_error

for error code details. For further information, see

Chapter 7

on page 149.

Performing FAL Operations

140

Advertising