Previous Page | Next Page

Informats

$EBCDICw. Informat



Converts EBCDIC character data to native format.
Category: Character

Syntax
Syntax Description
Details
Comparisons
Examples

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 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 (such as 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.  [cautionend]


Comparisons


Examples

input @1 name $ebcdic3.

Data Line Results*
----+----1
ASCII EBCDIC
qrs
717273
9899A2
QRS
515253
D8D9E2
+;>
2B3B3E
4E5E6E
* The 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.

Previous Page | Next Page | Top of Page