EBCDIC Function

The EBCDIC function converts a string in ASCII code into EBCDIC code.

Format

EBCDIC(expr)

Parameter(s)

expr

An expression evaluating to the string to be converted.

Description

The EBCDIC function converts each character of the given expression from its ASCII representation value to its EBCDIC representation value. The EBCDIC function acts as an inverse to the ASCII function.

See Appendix B: List Of ASCII Codes for a full listing of ASCII codes.

Example

In this application a file item needs to be converted from ASCII to EBCDIC and written onto a tape to be read by a MultiValue system.

STRING = EBCDIC(STRING)

WRITET STRING ELSE

   .

   .

   .

See Also

Statement and Function Reference