Please enable JavaScript to view this site.

ESL Documentation

Field Types

Initiates a conversation with a program in another machine. An identifier (OS/2 handle) representing the conversation is returned. This identifier must be passed in the other ESL APPC subroutine calls.

Declaration:

subroutine APPCStart(integer:CONVERSATION_ID,

                     string: PROFILE_NAME,
                     integer:SYNC_LEVEL,
                     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 established with the APPCSetInitProfile subroutine.

SYNC_LEVEL is an integer variable used to select the conversation synchronization level that your program and its partner use. (See Confirmation Processing.) Its values are:

APPC_None

(Default)  Specifies that the conversation cannot use APPC confirmation processing. It is an error to call APPCSendString with the SEND_IND argument set to APPC_Confirm, or to call APPCRequestConfirm or APPCSendConfirmed.

APPC_Confirm

The conversation may use the APPC confirmation facility to synchronize processing, and must respond to a request for confirmation from the partner.

 

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_SYNC_LEVEL

Invalid argument: SYNC_LEVEL

APPC_ERR_INV_STATE_SWITCH

Invalid argument: STATE_SWITCH

APPC_ERR_INV_PROFILE_NAME

Invalid argument: PROFILE_NAME

APPC_ERR_UNEXPECTED_EASEL_ERROR

Unexpected error on call to ESL routine.

APPC_ERR_UNEXPECTED_ERROR

Unexpected error encountered.

APPC_ERR_UNEXPECTED_DOS_ERROR

Unexpected operating system error encountered.

APPC_ERROR

Call APPCGetSystemError to get error information returned in PRIMARY_ERROR_CODE and SECONDARY_ERROR_CODE

Example:

response to start

   call APPCStart(ConvID,     # Conversation handle returned
                  Profile,    # "MYPROF"
                  ConvSync,   # APPC_Confirm
                  AutoSwitch) # APPC_Automatic