Please enable JavaScript to view this site.

ESL Documentation

Description:

Obtains a copy of the profile information previously saved. This call should be used by a program that calls APPCAcceptStart.

Declaration:

subroutine APPCGetAcceptProfile        (string: PROFILE_NAME,

                                 string: INVOCATION_CMD,

                                 integer:INACTIVITY_TIMEOUT,

                                 integer:BUFFER_SIZE,

                                 integer:ASCII_TABLE,

                                 integer:EBCDIC_TABLE )

                        library "eslappc" 

Arguments:

PROFILE_NAME is a string variable that specifies the name of the profile to be retrieved.

Note:        The PROFILE_NAME argument is the only one that you need to specify for this subroutine call. If the subroutine executes successfully, all other arguments will be filled in for you with the stored profile information that you are retrieving. The other arguments are described here only to help you evaluate their contents.

INVOCATION_CMD is a string variable that is set to the command issued by the partner TP (as a result of a call to APPCAcceptStart). This argument is specified when your ESL program is started by its partner dynamically. In this case, the command name includes a complete filename and can include a fully-qualified path where appropriate, as shown in the following examples:

eslrun.exe myeslpgm
eslrun.exe d:\mypgms\myeslpgm
"c:\program files\eslsyndetic\esl\eslrun.exe" chesspgm -d StartParm black
 

INACTIVITY_TIMEOUT is an integer variable that is set to the timer value, in seconds, allowing state switching to occur automatically when a conversation with authority to send is inactive for more than the specified number of seconds. This is a value that may require tuning. (Five seconds is a reasonable initial value.) If zero, no check is made to see if the partner application wants to send data between sends. This prevents automatic switching from being initiated by the partner. If automatic switching is disabled, your program, when it has completed sending, must be sure to call the APPCReadyToReceive subroutine, or call the APPCSendString subroutine with the MORE_TO_SEND argument set to APPC_ReadyToReceive.

BUFFER_SIZE is an integer between 0 and 65500 (default 2048) that is set to the buffer size, in bytes, to be used to send and receive data. If zero, a default buffer size of 2K bytes is used. The buffer size must be large enough to contain the largest number of characters or bytes of data to be sent in one call.

ASCII_TABLE is an integer value that is set to the ASCII code page used for conversions. If zero, the current system code page is used.

EBCDIC_TABLE is an integer value that is set to the EBCDIC code page used for conversions. If zero, the international code page, 500, is used.

Remarks: This routine can be used to verify if an ESL APPC profile exists or to display the current profile settings to a user who may update the values. If a profile does not exist, as indicated by a non-zero errorlevel value, the program must call APPCSetAcceptProfile to set the values.

Errors:

APPC_NORMAL_COMPLETION

Normal completion.

APPC_ERR_ON_FILE_OPEN

Error opening file or file does not exist.

APPC_ERR_ON_FILE_READ

Error reading file or profile not in profile file.

APPC_ERR_OUT_OF_MEMORY

Out of memory.

APPC_ERR_INV_PROFILE_NAME

Invalid argument: PROFILE_NAME

Example:

response to start
 call APPCGetAcceptProfile ( Profile,
                             Invoke_CMD,
                             Timeout,
                             Buffer_Size,
                             ASCII_Table,
                             EBCDIC_Table )