Create Input Buffer (QsnCrtInpBuf) API


  Required Parameter:

1 Input buffer size Input Binary(4)

  Omissible Parameter Group:

2 Increment amount Input Binary(4)
3 Maximum size Input Binary(4)
4 Input buffer handle Output Binary(4)
5 Error code I/O Char(*)

  Returned Value:

Input buffer handle Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Create Input Buffer (QsnCrtInpBuf) API creates an input buffer for use with low-level commands that accept an input buffer parameter.


Authorities and Locks

None


Required Parameter

Input buffer size
INPUT; BINARY(4)

The size of the input buffer, in bytes, to create. This parameter must be greater than 0 and less than the size of the underlying display file I/O buffer: approximately 4500 bytes for 24x80, 6300 bytes for 27x132, 8000 bytes for DBCS-capable displays, 8800 bytes for DBCS presentation screen-capable displays, and 16000 bytes for DBCS ideographic-capable displays.


Omissible Parameter Group

Increment amount
INPUT; BINARY(4)

The amount to increment the buffer size by if there is not enough space to store a read operation. If this parameter is omitted or specified with a zero value, the buffer size is not be incremented and input data is truncated if there is not enough space.

Maximum size
INPUT; BINARY(4)

The maximum size to increment the input buffer to when there is not enough space to store the result of a read operation. If this parameter is nonzero, it must be greater than the initial input buffer size parameter, and less than the size of the underlying display file I/O buffer. If this parameter is omitted or specified with a zero value, no maximum value is assigned for the input buffer, if the buffer is to be incremented, it will be incremented until either there is no additional storage available or the input buffer exceeds the size of the display file I/O buffer. If the increment amount parameter is omitted or specified with a zero value, this parameter is ignored and the maximum size is the same as the initial input buffer size.

Input buffer handle
OUTPUT; BINARY(4)

The variable containing the handle for the created input buffer after the QsnCrtInpBuf API has completed. The buffer state becomes the same as that following a QsnClrBuf operation.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Returned Value

Input buffer handle
OUTPUT; BINARY(4)

This API returns the value for the input buffer handle parameter, or -1 otherwise.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA312 E Buffer size parameter error.
CPFA314 E Memory allocation error.


API Introduced: V2R3
Top | Dynamic Screen Manager APIs | APIs by category