Description:
Obtains data from a partner application when notified that the data has become available.
Declaration:
subroutine APPCGetString(integer:CONVERSATION_ID,
string: STRING_VAR,
integer:AUTO_CONVERT)
library "eslappc"
Arguments:
•CONVERSATION_ID is an integer variable containing the conversation identifier (handle) of the particular conversation returned by either APPCStart or APPCAcceptStart.
•STRING_VAR is a string variable name whose value is set to the data received from the partner.
•AUTO_CONVERT is an integer variable that indicates whether automatic conversion from EBCDIC to ASCII of the contents of STRING_VAR should be performed. This conversion uses the code page tables specified in the ESL APPC profile. Data from a host computer may be in EBCDIC; data on the workstation is in ASCII. Valid constants are:
APPC_NoConvert |
(Default) Requests that conversion not be done. |
APPC_Convert |
Requests that the string be converted from EBCDIC to ASCII. |
Errors:
APPC_NORMAL_COMPLETION |
Normal completion. |
APPC_ERR_OUT_OF_MEMORY |
Out of memory. |
APPC_ERR_CONVERSION_ERROR |
Error on character conversion. |
APPC_ERR_INV_CONV_ID |
Invalid argument: CONVERSATION_ID |
APPC_ERR_INV_AUTO_CONVERT |
Invalid argument: AUTO_CONVERT |
APPC_ERR_INV_STRING_VAR. |
Invalid string variable. |
APPC_ERR_NO_DATA_AVAILABLE |
APPCGetString called when no data was received. |
APPC_ERR_SYSTEM_ERROR_PENDING |
APPCGetString called when system error was pending. |
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 OS/2 error encountered. |
Example:
response to stimulus APPC_EVENT APPC_Data ConvID
call APPCGetString ( ConvID, # Handle from Start/AcceptStart
GetMove, # String to hold partner's move
NoConvert ) # Do not convert data
call APPCSendString ( ConvID, # Handle from Start/AcceptStart
ResponseMove,# String containing next move
NoConvert, # Do not convert data
Confirm, # Confirm receipt
RdytoRecv ) # This send expects reply
# Response to confirm request from partner
response to stimulus APPC_EVENT APPC_ConfirmRequest ConvID
call APPCSendConfirmed ( ConvID ) # Handle from Start/AcceptStart