Please enable JavaScript to view this site.

ESL Documentation

Field Types

Initializes or updates profile information for a conversation that calls APPCAcceptStart. This subroutine may be used with APPCGetAcceptProfile to query the user for the profile values.

Declaration:

subroutine APPCSetAcceptProfile(string: PROFILE_NAME,
                                integer:ACTION,
                                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. This name must be the same name specified as the remotely attachable TP name in the communications program profiles. (This argument is case sensitive.)

ACTION is an integer variable that specifies the profile operation to be undertaken. Its values are:

APPC_CreateProfile

(Default) A new profile is being created. If a profile with the same name already exists, the existing profile will not be updated and errorlevel will be set to indicate that an error has occurred.

APPC_ReplaceProfile

An existing profile is being updated. If the profile does not exist, it will be created automatically.

APPC_DeleteProfile

An existing profile is being deleted. The profile entry represented by PROFILE_NAME will be deleted from the profile file.

Remarks:

INVOCATION_CMD is a string variable that specifies a 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 specifies a 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 set to 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. Maximum value is 2,145,600.

BUFFER_SIZE is an integer between 0 and 65500 (default 2048) that specifies the buffer size (in bytes) to be used to send and receive data. If specified as 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 represents the ASCII code page used for conversions. If specified as zero, the current system code page is used.

EBCDIC_TABLE is an integer value that represents the EBCDIC code page used for conversions. If specified as zero, the international code page, 500, is used.

The profile values are used by the transaction program that issues the APPC calls. We have provided a sample program to do profile maintenance (APPCPROF.EAL).

Errors:

APPC_NORMAL_COMPLETION

Normal completion.

APPC_ERR_ON_FILE_OPEN

Error opening file.

APPC_ERR_ON_FILE_WRITE

Error writing file.

APPC_ERR_OUT_OF_DISK_SPACE

Out of disk space.

APPC_ERR_OUT_OF_MEMORY

Out of memory.

APPC_ERR_INV_PROFILE_NAME

Invalid argument: PROFILE_NAME

APPC_ERR_INV_INACT_TIMEOUT

Invalid argument: INACTIVITY_TIMEOUT

APPC_ERR_INV_BUFFER_SIZE

Invalid argument: BUFFER_SIZE

APPC_ERR_INV_ASCII_TABLE

Invalid argument: ASCII_TABLE

APPC_ERR_INV_EBCDIC_TABLE

Invalid argument: EBCDIC_TABLE

APPC_ERR_INV_PROFILE_ACTION

Invalid argument: ACTION

APPC_ERR_INV_INVOC_COMMAND

Invalid argument: INVOCATION_CMD

Example:

response to start

   call APPCSetAcceptProfile(Profile,       # "MYPROFILE" example name
                             ProfileAction, # "APPC_ReplaceProfile"
                             Invoke_CMD,    # "ESLRUN.EXE MYESLPGM"
                             Timeout,       # 5 five seconds
                             Buffer_Size,   # 0 use 2K byte buffer
                             ASCII_Table,   # 0 use current code page
                             EBCDIC_Table ) # 0 use code page 500