The send_exit_file() or send_exit_file_c() function calls have the following return
codes. Return codes for the function are defined in ndmapi.h.
Header Header
GOOD_RC The file descriptor was received successfully.
ERROR_RC An error occurred and the file descriptor
was not sent successfully.Possible causes
include: Sterling Connect:Direct terminated,
an invalid value used for the exit_flag or fd
parameters, or the last message sent was not
send_exit_msg.
Sending a Message to Sterling Connect:Direct Usingsend_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 Sterling 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
Sterling 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:
Sterling Connect:Direct terminated or an
invalid value is used for the exit_flag or
msg_type parameters.
78 Sterling Connect:Direct for UNIX: User Guide