CMRCV 

Use

The call CMRCV prepares a program to receive data from its partner program.

If a program passes CMRCV in send mode, the program passes the send authorization to the partner program. The communications direction can be changed several times.

Activities

Syntax

CMRCV (conv_id, buffer, requested_length, data_received,

received_length, status_received,

request_to_send_received, rc)

Parameters

conv_id

ID of the conversation, via which data is to be received (input value)

buffer

Buffer, to which the received data is written (input value)

requested_length

Maximum number of characters that can be received (input value)

data_received

This variable (return code) indicates whether the program has received data.

If the program has received data, the variable contains information on the data received. The variable can have the following values:

received_length

Variable containing the number of characters received (return code)

status_received

This variable indicates whether the program has received status information (return code).

If the program has received status information, the variable contains information on the status of the conversation. The variable can have the following values:

request_to_send_received

Variable indicating whether the partner wants to send data (return code). This variable can have two possible values:

rc

Return code (output value)

CM_OK: Routine was executed without errors.

CM_DEALLOCATE_NORMAL: Connection was closed correctly by the partner program.

The return code contains the same value as rc.