CMSEND — Send_Data
|
Where
conversation_ID (character input) specifies the conversation identifier of the desired conversation.
- For a basic conversation, send_buffer specifies the data to be sent. The data consists of logical records, each containing a 2-byte length field followed by the data field. The length of the data field can range from 0 to 32765 bytes. The length of the record equals the length of the data field plus the 2-byte length field.
- For a mapped conversation, send_buffer specifies the data record to be sent. The length of the data record is given by the send_length parameter.
- For basic conversations, the send_length ranges in value from 0 to 32767. When a program issues a CMSEND statement during a basic conversation, send_length specifies the size of the send_buffer parameter and is not related to the length of a logical record.
- For mapped conversations, the send_length ranges in value from 0 to 32763. When a program issues a CMSEND statement during a mapped conversation, send_length specifies the length of a data record.
- CM_REQ_TO_SEND_RECEIVED
- CM_REQ_TO_SEND_NOT_RECEIVED
return_code (numeric output) specifies the result of the statement execution.
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 transmitted when a CMSEND 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 local program uses the CMSEND statement to simulate the CPI-C CMSEND call, which is used to send data to the remote program.
When issued during a mapped conversation, the CMSEND statement sends one data record to the remote program. The data record consists entirely of data and is not examined by the LU for possible logical records.
When issued during a basic conversation, this statement sends data to the remote program. The data consists of logical records. The amount of data is specified independently of the data format.
- CMSST — Set_Send_Type
- If send_type = CM_SEND_AND_PREP_TO_RECEIVE, optional setup may include: CMSPTR — Set_Prepare_To_Receive_Type
- If send_type = CM_SEND_AND_DEALLOCATE, optional setup may include: CMSDT — Set_Deallocate_Type
For more information on CMSEND and its parameters, refer to the Send_Data (CMSEND) call description in the “Call Reference” chapter of Systems Application Architecture Common Programming Interface Communications Reference.