Sending a Message to IBM Connect:Direct Using send_exit_msg() or send_exit_msg_c()
The send_exit_msg() or send_exit_msgc() function enables the user exit program to send a message to IBM® Connect:Direct®. This function returns control to the caller immediately after the message is queued.
Following is the format of the send_exit_msg() function:
int send_exit_msg int exit_flag
int msg_type,
char * send_buf,
int send_buf_len
Following are the parameters for send_exit_msg() or send_exit_msg_c():
Parameter | Description | Value |
---|---|---|
exit_flag | A flag to specify the sender ID. The only valid value a user exit program can use is EXIT_PROGRAM. | EXIT_PROGRAM |
msg_type | A message name. Messages are requests from IBM Connect:Direct and the associated response from the user exit program. | Pointer to message |
send_buf | A pointer to the memory location of the message to be sent. | Pointer to message |
send_buf_len | The length in bytes of the message to be sent. | Length of message |
Following are the return codes for send_exit_msg() or send_exit_msg_c(). Return codes for the function are defined in ndmapi.h.
Return Code | Description |
---|---|
GOOD_RC | The message was sent successfully. |
ERROR_RC | An error occurred and the message was not sent successfully. Possible causes include: IBM Connect:Direct terminated or an invalid value is used for the exit_flag or msg_type parameters. |