Write Data

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

Table 6-15 Arguments, Types and Descriptions for Write Data

Argument

Type

Description

 

 

 

global

void (see Note 1)

Global memory area

g_error

long (see Note 1)

An error information stored area

buf

char (see Note 1)

Read buffer

buflen

long (see Note 1)

Data length transferred to buffer

Return value: reclen

long (see Note 1)

Data length read to buffer

-1

 

Abnormal end

Note 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.)

Note 2: When a full data error occurs, a return value of dataset_Put2 is “- 1”, but a 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 section Reading Data.

Argument:

global: Global memory area (Specify a Global memory area gotten by dataset_AllocGlobal.)

g_error: Specify an address to store FAL error code.

buf: Specify a buffer to store write data.

buflen: Specify 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, refer to the contents of g_error for error code details. For further information, see Appendix B.

Performing File Access Library (FAL) Operations

6-23

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

Page 177
Image 177
Hitachi MK-96RD647-01 manual Arguments, Types and Descriptions for Write Data