CMRCV — Receive
|
Where
conversation_ID (character input) specifies the conversation identifier of the desired conversation.
receive_buffer (character output) specifies the variable in which the program is to receive data. This parameter contains data only if return_code is set to CM_OK or CM_DEALLOCATED_NORMAL and data_received is not set to CM_NO_DATA_RECEIVED.
requested_length (numeric input) specifies the maximum amount of data the program is to receive. Valid requested_length values range from 0 to 32767.
- CM_NO_DATA_RECEIVED (basic and mapped conversations)
- CM_DATA_RECEIVED (basic conversations only)
- CM_COMPLETE_DATA_RECEIVED (basic and mapped conversations)
- CM_INCOMPLETE_DATA_RECEIVED (basic and mapped conversations)
received_length (numeric output) specifies the variable containing the amount of data the program received, up to the maximum. If the program does not receive data on this statement, the value contained in received_length is meaningless.
- CM_NO_STATUS_RECEIVED
- CM_SEND_RECEIVED
- CM_CONFIRM_RECEIVED
- CM_CONFIRM_SEND_RECEIVED
- CM_CONFIRM_DEALLOC_RECEIVED
- CM_REQ_TO_SEND_RECEIVED
- CM_REQ_TO_SEND_NOT_RECEIVED
return_code (numeric output) specifies the result of the statement execution. The return codes that can be returned depend on the state and characteristics of the conversation at the time this statement is issued.
log_byte is a 1-byte string constant or a string expression that specifies a byte of user data to be associated with this CPI-C statement during logging. log_byte is also associated with the data which may be received when a CMRCV successfully completes. The log_byte remains active until another CPI-C statement is issued. This byte gives users of the Response Time Utility a way to identify transactions from transmitted or received data when gathering statistics by the various user-defined "log_byte" categories. Only the first character or first two hexadecimal digits of the string expression are used. The default log_byte is X'00'.
Function
A program uses the CMRCV statement to simulate the CPI-C CMRCV call, which is used to receive information from a given conversation. The information received can be a data record (on a mapped conversation), data (on a basic conversation), conversation status, or a request for confirmation.
- CMSF — Set_Fill
- CMSRT — Set_Receive_Type
For more information on CMRCV and its parameters, refer to the Receive (CMRCV) call description in the “Call Reference” chapter of Systems Application Architecture Common Programming Interface Communications Reference.