HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

CPI-C Calls
Receive (cmrcv)
Chapter 3210
Errors
The state changes shown in Table 3-11, State Changes Caused by a Data
Transmission Error, can occur when a data transmission error is
encountered. (This is indicated by one of the following return codes:
CM_PROGRAM_ERROR_PURGING, CM_PROGRAM_ERROR_NO_TRUNC,
CM_SVC_ERROR_PURGING, or CM_SVC_ERROR_NO_TRUNC.)
Usage Notes
The following sections describe additional usage information for the
Receive call.
Truncated Records
If the partner program truncates a logical record, the local program
receives notification of the truncation through the
return_code
parameter on the next Receive call.
Setting the Requested_Length Parameter to Zero
If a program issues the Receive call with
requested_length
set to 0
(zero), the call is executed as usual.
However, the
data_received
and
status_received
parameters are not
set on the same Receive call. (One exception to this situation is the null
record sent over a mapped conversation, described in the next
paragraph.)
In a mapped conversation in which data is available from the partner
program, the
data_received
parameter is set to
CM_INCOMPLETE_DATA_RECEIVED. If a null record is available
(
send_length
in the Send_Data call issued by the partner program is set
Table 3-11 State Changes Caused by a Data Transmission Error
return_code
Old state New state
CM_PROGRAM_ERROR_PURGING Receive No change
CM_PROGRAM_ERROR_NO_TRUNC Receive No change
CM_SVC_ERROR_PURGING Send Receive
CM_SVC_ERROR_NO_TRUNC Send-Pending Receive