EBCDIC Function

Converts a string value from ASCII to EBCDIC.

Syntax

EBCDIC(expression)

Syntax Elements

expression is any valid DataBasic expression or any string, substring, or value; expressed as a variable name, a value, or a string enclosed in quotes.

Comment

This function is useful when writing EBCDIC format tapes with the WRITET statement.

Examples

X = "!"
Y = EBCDIC(X)
PRINT Y

Prints the EBCDIC value of variable X, which is a Z.

B = EBCDIC(A)
WRITET B ELSE STOP

Converts the value of string A from ASCII to EBCDIC and assigns it to variable B. The contents of B are then written to tape.