Please enable JavaScript to view this site.

ESL Documentation

Field Types

Performs EBCDIC to ASCII conversion. The conversion is performed in place, meaning that the EBCDIC contents of the string variable will be replaced with the converted ASCII string.

Note: You do not need to use this subroutine if a value of APPC_Convert is used for the AUTO_CONVERT argument on the APPCSendString call.

Declaration:

subroutine APPCConvertE2A( integer:CONVERSATION_ID,

                           string: STRING,

                           integer:INDEX_START,

                           integer:INDEX_END,

                           integer:ASCII_TABLE,

                           integer:EBCDIC_TABLE )
                  library "eslappc"

Arguments:        

CONVERSATION_ID is an integer variable containing the conversation identifier (handle) for the APPC conversation returned by either APPCStart or APPCAcceptStart.

STRING is a string variable containing the EBCDIC string to be converted to ASCII. When the conversion is complete, this string contains ASCII characters.

INDEX_START is an integer variable indicating the position of the first character in the string to be converted. The first character of a string is indexed by one. Zero can be used as a default value to mean start with the first character.

INDEX_END is an integer variable indicating the position of the last character in the string to be converted. The number of characters in the string is equal to the index to the last character position. Zero can be used as a default value to indicate the last character.

ASCII_TABLE is an integer variable representing the ASCII code page to use for conversion. If this value is zero, the ASCII code page specified in the ESL APPC profile is used.

EBCDIC_TABLE is an integer variable representing the EBCDIC code page to use for conversion. If this value is zero, the EBCDIC code page specified in the ESL APPC profile is used.

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_INDEX_START

Invalid argument: INDEX_START

APPC_ERR_INV_INDEX_END

Invalid argument: INDEX_END

APPC_ERR_INV_STRING_VAR

Invalid string variable.

APPC_ERR_INV_ASCII_TABLE

Invalid argument: ASCII_TABLE

APPC_ERR_INV_EBCDIC_TABLE

Invalid argument: EBCDIC_TABLE

APPC_ERR_UNEXPECTED_EASEL_ERROR

Unexpected error on call to ESL routine.

APPC_ERR_UNEXPECTED_ERROR

Unexpected error encountered.

Example:

copy 0 to Zero

call APPCConvertE2A ( ConvID,      # Handle from Start/AcceptStart
                      String,      # Convert string to ASCII
                      Zero, Zero,  # Convert the entire string
                      Zero, Zero ) # Use the default code pages