Retrieve Number of Bytes Read from Screen (QsnRtvReadLen) API


  Required Parameter Group:

1 Input buffer handle Input Binary(4)

  Omissible Parameter Group

2 Read data length Output Binary(4)
3 Error code I/O Char(*)

  Returned Value:

Read data length Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Retrieve Number of Bytes Read from Screen (QsnRtvReadLen) API returns the number of bytes of data read from the screen into an input buffer after an input operation.


Authorities and Locks

None.


Required Parameter

Input buffer handle
INPUT; BINARY(4)

A handle for the input buffer that contains the results of the input operation.


Omissible Parameter Group

Read data length
OUTPUT; BINARY(4)

The variable that contains the read data length when the QsnRtvReadLen API has completed. This number may be larger than the number of bytes actually contained in the buffer if the input buffer was not large enough to hold all the data. Use the Retrieve Length of Data in Input Buffer (QsnRtvDtaLen) API to determine the amount of data contained in the buffer or to determine if truncation occurred.

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

Read data length
OUTPUT; BINARY(4)

This API returns the value for the read data length 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.
CPFA319 E No data in input buffer.
CPFA31E E Required parameter &1 omitted.
CPFA320 E Pointer parameter is null.
CPFA331 E Buffer handle incorrect.
CPFA334 E Low level environment handle incorrect.


API introduced: V2R3

[ Back to top | Dynamic Screen Manager APIs | APIs by category ]