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

GOOD_RC

ERROR_RC

Header

The file descriptor was received successfully.

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 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 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

EXIT_PROGRAM

 

value a user exit program can use is

 

 

EXIT_PROGRAM.

 

 

 

 

msg_type

A message name. Messages are requests from

Pointer to message

 

Sterling Connect:Direct and the associated response

 

 

from the user exit program.

 

 

 

 

send_buf

A pointer to the memory location of the message to

Pointer to message

 

be sent.

 

 

 

 

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

GOOD_RC

ERROR_RC

Description

The message was sent successfully.

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.

78Sterling Connect:Direct for UNIX: User Guide

Page 84
Image 84
IBM 4J manual Following are the parameters for sendexitmsg or sendexitmsgc, Header