$EBCDICw. Informat

Converts EBCDIC character data to native format.
Category: Character

Syntax

$EBCDICw.

Syntax Description

w
specifies the width of the input field.
Default:1 if the length of the variable is undefined. Otherwise, the default is the length of the variable.
Range:1–32767

Details

If EBCDIC is the native format, no conversion occurs.
Note: Any time a text file originates from anywhere other than the local encoding environment, it might be necessary to specify the ENCODING= option on either ASCII or EBCDIC environments. When that you read an EBCDIC text file on an ASCII platform, it is recommended that you specify the ENCODING= option in the FILENAME or INFILE statement. However, if you use the DSD and the DLM= or DLMSTR= options in the FILENAME or INFILE statement, the ENCODING= option is a requirement because these options require certain characters in the session encoding (for example, quotation marks, commas, and blanks). The use of encoding-specific informats should be reserved for use with true binary files. That is, they contain both character and non-character fields.

Comparisons

  • On an IBM mainframe system, $EBCDICw. behaves like the $CHARw. informat.
  • On all other systems, $EBCDICw. converts EBCDIC data to ASCII.

Example

input @1 name $ebcdic3.
Data Line
Result 1
----+----1
ASCII
EBCDIC
qrs
717273
9899A2
QRS
515253
D8D9E2
+;>
2B3B3E
4E5E6E
1The results are hexadecimal representations of codes for characters. Each two hexadecimal characters correspond to one byte of binary data, and each byte corresponds to one character value.