Converts EBCDIC character data to native format.
-
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 |
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]](../../../../common/63294/HTML/default/images/cautend.gif)
-
On an IBM mainframe system, $EBCDICw. behaves like the $CHARw.
informat.
-
On all other systems, $EBCDICw.
converts EBCDIC data to ASCII.
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. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.