Set_Log_Data

The Set_Log_Data call (function name cmsld) specifies a log message (log data) and its length to be sent to the partner LU. This call is allowed only in basic conversations. It overrides the default log data, which is null, and the default log data length, which is zero.

CM_ENTRY Set_Log_Data(
  unsigned char FAR *conversation_ID,  
  unsigned char FAR *log_data,         
  CM_INT32 FAR *log_data_length,       
  CM_INT32 FAR *return_code            
);
 

Parameters

conversation_ID
Supplied parameter. Specifies the identifier for the conversation. The value of this parameter was returned by Initialize_Conversation or Accept_Conversation.
log_data
Supplied parameter. Specifies the starting address of the data to be sent to the partner LU. It can contain up to 512 ASCII characters. The allowed characters are:
log_data_length
Supplied parameter. Specifies the length of the log data. The range is from 0 through 512 bytes.

A length of 0 indicates that there is no log data, and the log_data parameter is ignored.

return_code
The code returned from this call. The valid return codes are listed below.

Return Codes

cm_ok
Primary return code; the call executed successfully.
cm_program_parameter_check
Primary return code; one of the following occurred:
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.

State Changes

The conversation can be in any state except RESET.

There is no state change.

Remarks

The log data specified by Set_Log_Data is sent to the partner LU when the local program issues one of the following calls:

After sending the log data to the partner LU, the local LU resets the log data to null and the log data length to zero.

CPI-C automatically converts the log data from ASCII to other encoding standards, such as EBCDIC, as required.