Read from Invited Device (QsnReadInvited) API


  Required Parameter Group:

1 Input buffer handle Input Binary(4)

  Omissible Parameter Group:

2 Command buffer handle Input Binary(4)
3 Low-level environment handle Input Binary(4)
4 Return code Output Binary(4)
5 Error code I/O Char(*)

  Returned Value:

Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

The Read from Invited Device (QsnReadInvited) API issues a read from invited device operation. Data will be returned in the format corresponding to the read command used.

If the command buffer handle is specified and there is data to be sent in the command buffer, a QsnPutBuf will be issued to send the data to the screen. If no read command is in the command buffer, a read MDT command will be added to the data stream. Then the read from invited device will be issued.

The input buffer handle parameter must be specified.

See the appropriate read API for information on the format of the data returned.


Authorities and Locks

None


Restrictions

The invite active flag must be on in the low level environment description.

An error will be issued if the command buffer is empty, or not specified, and no other write has been done with the invite active flag on in the low level environment description.


Required Parameter Group

Input buffer handle
INPUT; BINARY(4)

A handle for the input buffer that receives the result of the input operation if a direct operation is specified. The result can be queried using the input buffer query operations.


Omissible Parameter Group

Command buffer handle
INPUT; BINARY(4)

A handle for the command buffer in which to find the read command.

If no read command is found in the specified command buffer, a read MDT with null control characters will be added to the data stream. This is the equivalent of calling the QsnReadMDT API.

Low-level environment handle
INPUT; BINARY(4)

The low-level environment that the operation applies to. If this parameter is omitted or given with a value of zero, the default low-level environment is used.

Return code
OUTPUT; BINARY(4)

A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, -1 if there was a general failure, and -2 if the operation was a read from invited device which timed out.

Check the WAITRCD parameter on the display file specified in the low level environment description, to determine the time out value.

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

Return code
OUTPUT; BINARY(4)

A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, -1 if there was a general failure, and -2 if the operation was a read from invited device which timed out.

Check the WAITRCD parameter on the display file specified in the low level environment description, to determine the time out value.


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.
CPFA301 E Command buffer is full.
CPFA304 E Data-stream error &1 reported for screen I/O operation.
CPFA305 E Cannot add operation to command buffer.
CPFA309 E Invalid cursor position in command buffer.
CPFA31E E Required parameter &1 omitted.
CPFA326 E Screen must be redrawn.
CPFA327 E Low level environment description value incorrect.
CPFA32F E Buffer type incorrect.
CPFA331 E Buffer handle incorrect.
CPFA334 E Low level environment handle incorrect.
CPFA344 E The file &2 in library &3 is not valid.
CPFA345 E The invite active flag is not valid.


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