Buffers

Description

A number of arguments used in Client-Library functions affect the contents of buffers: ACTION, BUFFER, BUFFER-LEN, BUFBLANKSTRIP, OUTLEN.

These arguments are described individually below. For a summary of argument values and their interaction, see Table 2-1.

Arguments

Summary of buffer entries

Table 2-1 summarizes the interaction between ACTION, BUFFER, BUFFER-LEN, and OUTLEN.

Table 2-1: ACTION, BUFFER, BUFFER-LEN, and OUTLEN

For this ACTION

When BUFFER

BUFFER-LEN is

OUTLEN is

Result

CS-CLEAR

N/A

CS-UNUSED

Ignored

The property reverts to its default value.

CS-SET

Contains a variable-length character string

The length of the string

Ignored

The data in BUFFER is read by the function.

CS-SET

Contains a variable-length character string for which the terminating character is the last non-blank character

The maximum length of the string

Ignored

The application sets the value of BUFBLANKSTRIP to CS-TRUE.

The data in BUFFER is read by the function.

CS-SET

Contains a fixed-length character string or symbolic value

CS-UNUSED

Ignored

The data in BUFFER is read by the function.

CS-GET

Is large enough for the return character string

The length of the buffer

Set by Client-Library

The retrieved value is copied to the buffer.

OUTLEN returns the length of the retrieved value.

CS-GET

Is not large enough for the return character string

The length of the buffer

Set by Client-Library

No data is copied to the buffer.

OUTLEN returns the length of the value being retrieved.

The function returns CS-FAIL, indicating that you should assign the value returned here to the length argument and execute the program again.

CS-GET

Is assumed to be large enough for a fixed-length or symbolic value

CS-UNUSED

Set by Client-Library

The retrieved value is copied to the buffer.

OUTLEN returns the length of the value being retrieved.