Receive Request (QzdmReceiveRequest) API

  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name of receiver variable Input Char(8)
4 Request variable Input Char(*)
5 Length of request variable Input Binary(4)
6 Format name of request variable Input Char(8)
7 Error code I/O Char(*)

  Library Name / Service Program: QSOC/QZDMMDTA

  Default Public Authority: *EXECUTE

  Threadsafe: No

The Receive Request (QzdmReceiveRequest) API is used to receive a request or a message over an OptiConnect path. A maximum of 32KB of data may be transferred in a single receive request.


Restrictions

The following restrictions apply:


Authorities and Locks

Service Program Authority
*EXECUTE

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that is to receive the output control information from the Receive Request (QzdmReceiveRequest) API.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable, in bytes. The length of the receiver variable must be at least equal to or greater than the length of the output format.

Format name of receiver variable
INPUT; CHAR(8)

The format of the information that is returned from the Receive Request (QzdmReceiveRequest) API. The RQRC0100 format is used by this API for the receiver variable. See RQRC0100 Format for more information on the RQRC0100 format.

Request variable
INPUT; CHAR(*)

The request variable structure that describes the input for the Receive Request (QzdmReceiveRequest) API.

Length of request variable
INPUT; BINARY(4)

The length of the request variable, in bytes. The length of the request variable must be at least equal to the length of the input format, and less than or equal to the maximum length of 4KB.

Format name of request variable
INPUT; CHAR(8)

The format of the information that is provided as input for the Receive Request (QzdmReceiveRequest) API. The RQRQ0100 format is used by this API for the request variable. See RQRQ0100 Format for more information on the RQRQ0100 format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


RQRC0100 Format

The following table defines the information returned for Format RQRC0100.

Offset Type Field
Dec Hex
0 0 CHAR(8) Transaction identifier
8 8 CHAR(8) Path identifier
16 10 BINARY(4) Total request data length
20 14 BINARY(4) Current output data length
24 18 BINARY(4) Maximum response data length


RQRQ0100 Format

The following table defines the information required for Format RQRQ0100.

Offset Type Field
Dec Hex
0 0 CHAR(16) Stream identifier
16 10 BINARY(4) Time-out value
20 14 BINARY(4) Offset to output descriptors
24 18 BINARY(4) Number of output descriptors
28 1C CHAR(4) Reserved
These fields repeat for each output descriptor PTR(SPP) Data buffer pointer
BINARY(4) Data buffer length
CHAR(12) Reserved


Field Descriptions

Current output data length. The total data length of the request that was moved to the user's data buffer area. If the current output data length is less than the total request data length, then this indicates that not all of the data was received. It is the responsibility of the user's application program to retry the entire transaction by using a larger data buffer size for the Receive Request (QzdmReceiveRequest) API to receive all of the data.

Data buffer length. The length of the data buffer that is used for receiving data.

Data buffer pointer. The pointer to the data buffer that is used for receiving data.

Maximum response data length. The maximum length that is allowed for the response data. This field is provided by the user as input on the Send Request (QzdmSendRequest) API and indicates the maximum response data length allowed for the Send Response (QzdmSendResponse) API.

Number of output descriptors. The number of output descriptors that are used. An output descriptor describes where the output data may be found. The output descriptor consists of a space pointer to a data buffer and the length of the data buffer. A maximum of three output descriptors may be specified.

Offset to output descriptors. The offset to the output descriptors.

Path identifier. The OptiConnect path that is to be used for communications. This field is provided as output on the Receive Request (QzdmReceiveRequest) API.

Reserved. A reserved space for the purpose of aligning pointer values on a 16-byte boundary. This field must be initialized to binary 0.

Stream identifier. The OptiConnect stream that is used for communications. This field is provided as output on the Open Stream (QzdmOpenStream) API.

Time-out value. A length of time, in milliseconds, to wait for the Receive Request (QzdmReceiveRequest) API to complete. If the Receive Request (QzdmReceiveRequest) API does not complete before the specified time-out value, then the exception CPFADFE is returned. The user should then re-issue the Receive Request (QzdmReceiveRequest) API and specify the same time-out value or an increased time-out value.

The Receive Request (QzdmReceiveRequest) API remains outstanding, and control is not returned to the user application until either of the following occurs:

A value of -1 may be specified, which indicates to wait forever for the Receive Request (QzdmReceiveRequest) API to complete.

Total request data length. The total data length of the request that is available to be received. This field is provided as output on the Receive Request (QzdmReceiveRequest) API.

Transaction identifier. The specific transaction associated with this Receive Request (QzdmReceiveRequest) API. This field is provided as output on the Receive Request (QzdmReceiveRequest) API. This field must then be provided as input on the corresponding Send Response (QzdmSendResponse) API.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C1D E Length specified in parameter &1 not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFADF0 E The OptiConnect QSOC subsystem must be active.
CPFADF1 E OptiConnect communication error.
CPFADF3 E OptiConnect path not valid or closed.
CPFADF4 E OptiConnect detected sequence error.
CPFADF5 E OptiConnect API internal error, function code &1, return code &2.
CPFADF6 E Request variable not valid, reason code &1.
CPFADFE E Time-out occurred.
CPFADFF E Transaction was terminated.


API introduced: V3R7
Top | Communications APIs | APIs by category