Description:
Accepts a conversation initiated by a program in another machine. An identifier (integer) representing the conversation is returned. This identifier must be passed in the other APPC subroutine calls.
Declaration:
subroutine APPCAcceptStart( integer:CONVERSATION_ID,
string: PROFILE_NAME,
integer:STATE_SWITCH )
library "eslappc"
Arguments:
•CONVERSATION_ID is an integer variable that is set to an identifier for the conversation by this subroutine.
•PROFILE_NAME is a string variable that specifies the name of the profile created for the acceptor program. This name MUST be the same name specified as the remotely attachable TP name in the your communications program profiles. This argument is case sensitive.
•STATE_SWITCH is an integer variable used to indicate whether the automatic interface or the controlled interface is to be used. The automatic interface reduces the number of calls needed to send and receive data; state switching is automatic. The controlled interface provides full APPC flexibility to sophisticated applications. Valid constants are:
APPC_Automatic |
(Default) The conversation will use the automatic interface. |
APPC_Controlled |
The conversation will use the controlled interface. |
Errors:
APPC_NORMAL_COMPLETION |
Normal completion. |
APPC_ERR_OUT_OF_MEMORY |
Out of memory. |
APPC_ERR_INV_STATE_SWITCH |
Invalid argument: STATE_SWITCH |
APPC_ERR_INV_PROFILE_NAME |
Invalid argument: PROFILE_NAME |
APPC_ERR_UNEXPECTED_ERROR |
Unexpected error encountered. |
APPC_ERROR |
Call APPCGetSystemError to get error information returned in PRIMARY_ERROR_CODE and SECONDARY_ERROR_CODE. |
Example:
response to start
call APPCAcceptStart ( ConvID, # Handle is returned
AcceptProfileName, # Profile name = TP name
State_Switch ) # APPC_Automatic