Data Representation |
Characters are stored in a computer using a "character encoding scheme" that maps the individual characters to binary integers. The two most commonly used single-byte character encoding schemes are ASCII and EBCDIC. IBM mainframe computers use the EBCDIC encoding, which contains representations for 256 characters. Each character has a unique representation, a binary integer from 0 to 256 (x'FF').
The previous paragraph contains a simplified overview of character encoding, ASCII, and EBCDIC. There are multiple forms of ASCII and multiple forms of EBCDIC. Often, these encodings are referred to as "code pages." The different EBCDIC code pages generally represent common characters, like letters and numbers, with the same code. However, the code pages use different codes for less common characters.
The following table shows the EBCDIC code for commonly used characters. These representations are correct for all EBCDIC code pages.
Hexadecimal | Character | Hexadecimal | Character | Hexadecimal | Character | Hexadecimal | Character |
'40'x | space | '93' | l | 'C4' | D | 'E5' | V |
'4B' | . | '94' | m | 'C5' | E | 'E6' | W |
'4E' | + | '95' | n | 'C6' | F | 'E7' | X |
'5C' | * | '96' | o | 'C7' | G | 'E8' | Y |
'60' | - | '97' | p | 'C8' | H | 'E9' | Z |
'61' | / | '98' | q | 'C9' | I | 'F0' | 0 |
'6D' | _ | '99' | r | 'D1' | J | 'F1' | 1 |
'81' | a | 'A2' | s | 'D2' | K | 'F2' | 2 |
'82' | b | 'A3' | t | 'D3' | L | 'F3' | 3 |
'83' | c | 'A4' | u | 'D4' | M | 'F4' | 4 |
'84' | d | 'A5' | v | 'D5' | N | 'F5' | 5 |
'85' | e | 'A6' | w | 'D6' | O | 'F6' | 6 |
'86' | f | 'A7' | x | 'D7' | P | 'F7' | 7 |
'87' | g | 'A8' | y | 'D8' | Q | 'F8' | 8 |
'88' | h | 'A9' | z | 'D9' | R | 'F9' | 9 |
'89' | i | 'C1' | A | 'E2' | S |
|
|
'91' | j | 'C2' | B | 'E3' | T |
|
|
'92' | k | 'C3' | C | 'E4' | U |
|
|
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.