EBCDIC
Extended Binary Coded Decimal Interchange Code (EBCDIC) is an 8-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems.
EBCDIC descended from the code used with punched cards and the corresponding six bit binary-coded decimal code used with most of IBM's computer peripherals of the late 1950s and early 1960s.[1]
It is also employed on various non-IBM platforms such as Fujitsu-Siemens' BS2000/OSD, OS-IV, MSP, and MSP-EX, HP MPE/iX, and Unisys VS/9 and MCP.
History
EBCDIC /ˈɛbsɨdɪk/ was devised in 1963 and 1964 by IBM and was announced with the release of the IBM System/360 line of mainframe computers. It is an 8-bit character encoding, in contrast to, and developed separately from, the 7-bit ASCII encoding scheme. It was created to extend the existing binary-coded decimal (BCD) interchange code, or BCDIC, which itself was devised as an efficient means of encoding the two zone and number punches on punched cards into 6 bits.
While IBM was a chief proponent of the ASCII standardization committee,[2] the company did not have time to prepare ASCII peripherals (such as card punch machines) to ship with its System/360 computers, so the company settled on EBCDIC.[3] The System/360 became wildly successful, and together with clones such as RCA Spectra 70, ICL System 4, and Fujitsu FACOM, thus so did EBCDIC.
All IBM mainframe and midrange peripherals and operating systems use EBCDIC as their inherent encoding[4] (with toleration for ASCII, for example, ISPF in z/OS can browse and edit both EBCDIC and ASCII encoded files). Software and many hardware peripherals can translate to and from encodings, and modern mainframes (such as IBM zSeries) include processor instructions, at the hardware level, to accelerate translation between character sets.
There is an EBCDIC-oriented Unicode Transformation Format called UTF-EBCDIC proposed by the Unicode consortium, designed to allow easy updating of EBCDIC software to handle Unicode, but not intended to be used in open interchange environments. Even on systems with extensive EBCDIC support, it has not been popular. For example, z/OS supports Unicode (preferring UTF-16 specifically), but z/OS only has limited support for UTF-EBCDIC.
IBM AIX running on the RS/6000 and its descendants including the IBM Power Systems, Linux running on z Systems, and operating systems running on the IBM PC and its descendants use ASCII.
Compatibility with ASCII
Oddly enough, the fact that all the code points were different was less of a problem for inter-operating with ASCII than the fact that sorting EBCDIC put the lowercase letters before the uppercase letters and those before the numbers, exactly the opposite order that sorting ASCII did.
Portability is hindered by a lack of many symbols commonly used in programming and in network communications, such as the curly braces.
The gaps between the letters made simple constructions that worked in ASCII fail on EBCDIC. This often caused problems when porting from ASCII systems.
By using all 8 bits EBCDIC may have encouraged the use of the 8-bit byte by IBM, while ASCII encouraged systems with 36 bits (as you could pack 5 7-bit ASCII characters in). When 8-bit bytes became popular ASCII systems often used the "unused" bit for other purposes, this made it much more difficult to transition to larger character sets.
Codepage layout
The table below is based on CCSID 500, one of the code page variants of EBCDIC; it shows only the basic (English) EBCDIC characters. Characters 00–3F and FF are controls, 40 is space, 41 is no-break space (RSP: "Required Space"), E1 is numeric space (NSP: "Numeric Space"), and CA is soft hyphen. Characters are shown with their equivalent Unicode codes. Unassigned codes are typically filled with international or region-specific characters in the various EBCDIC code page variants, but the punctuation marks are often moved around as well, only the letters and numbers and space have the same assignments in all EBCDIC code pages.
In each table cell below, the first row is an abbreviation for a control code or (for printable characters) the character itself; the second row is the Unicode code; and the third row is decimal value of the EBCDIC code.
_0 | _1 | _2 | _3 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0_ |
NUL 0000 0 |
SOH 0001 1 |
STX 0002 2 |
ETX 0003 3 |
SEL 4 |
HT 0009 5 |
RNL 6 |
DEL 007F 7 |
GE 8 |
SPS 9 |
RPT 10 |
VT 000B 11 |
FF 000C 12 |
CR 000D 13 |
SO 000E 14 |
SI 000F 15 |
1_ |
DLE 0010 16 |
DC1 0011 17 |
DC2 0012 18 |
DC3 0013 19 |
RES ENP 20 |
NL 0085 21 |
BS 0008 22 |
POC 23 |
CAN 0018 24 |
EM 0019 25 |
UBS 26 |
CU1 27 |
IFS 001C 28 |
IGS 001D 29 |
IRS 001E 30 |
IUS ITB 001F 31 |
2_ |
DS 32 |
SOS 33 |
FS 34 |
WUS 35 |
BYP INP 36 |
LF 000A 37 |
ETB 0017 38 |
ESC 001B 39 |
SA 40 |
SFE 41 |
SM SW 42 |
CSP 43 |
MFA 44 |
ENQ 0005 45 |
ACK 0006 46 |
BEL 0007 47 |
3_ |
48 |
49 |
SYN 0016 50 |
IR 51 |
PP 52 |
TRN 53 |
NBS 54 |
EOT 0004 55 |
SBS 56 |
IT 57 |
RFF 58 |
CU3 59 |
DC4 0014 60 |
NAK 0015 61 |
62 |
SUB 001A 63 |
4_ |
SP 0020 64 |
RSP 00A0 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
. 002E 75 |
< 003C 76 |
( 0028 77 |
+ 002B 78 |
| 007C 79 |
5_ |
& 0026 80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
! 0021 90 |
$ 0024 91 |
* 002A 92 |
) 0029 93 |
; 003B 94 |
¬ 00AC 95 |
6_ |
- 002D 96 |
/ 002F 97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
¦ 00A6 106 |
, 002C 107 |
% 0025 108 |
_ 005F 109 |
> 003E 110 |
? 003F 111 |
7_ |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
` 0060 121 |
: 003A 122 |
# 0023 123 |
@ 0040 124 |
' 0027 125 |
= 003D 126 |
" 0022 127 |
8_ |
128 |
a 0061 129 |
b 0062 130 |
c 0063 131 |
d 0064 132 |
e 0065 133 |
f 0066 134 |
g 0067 135 |
h 0068 136 |
i 0069 137 |
138 |
139 |
140 |
141 |
142 |
± 00B1 143 |
9_ |
144 |
j 006A 145 |
k 006B 146 |
l 006C 147 |
m 006D 148 |
n 006E 149 |
o 006F 150 |
p 0070 151 |
q 0071 152 |
r 0072 153 |
154 |
155 |
156 |
157 |
158 |
159 |
A_ |
160 |
~ 007E 161 |
s 0073 162 |
t 0074 163 |
u 0075 164 |
v 0076 165 |
w 0077 166 |
x 0078 167 |
y 0079 168 |
z 007A 169 |
170 |
171 |
172 |
173 |
174 |
175 |
B_ |
^ 005E 176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
[ 005B 186 |
] 005D 187 |
188 |
189 |
190 |
191 |
C_ |
{ 007B 192 |
A 0041 193 |
B 0042 194 |
C 0043 195 |
D 0044 196 |
E 0045 197 |
F 0046 198 |
G 0047 199 |
H 0048 200 |
I 0049 201 |
SHY 00AD 202 |
203 |
204 |
205 |
206 |
207 |
D_ |
} 007D 208 |
J 004A 209 |
K 004B 210 |
L 004C 211 |
M 004D 212 |
N 004E 213 |
O 004F 214 |
P 0050 215 |
Q 0051 216 |
R 0052 217 |
218 |
219 |
220 |
221 |
222 |
223 |
E_ |
\ 005C 224 |
NSP 2007 225 |
S 0053 226 |
T 0054 227 |
U 0055 228 |
V 0056 229 |
W 0057 230 |
X 0058 231 |
Y 0059 232 |
Z 005A 233 |
234 |
235 |
236 |
237 |
238 |
239 |
F_ |
0 0030 240 |
1 0031 241 |
2 0032 242 |
3 0033 243 |
4 0034 244 |
5 0035 245 |
6 0036 246 |
7 0037 247 |
8 0038 248 |
9 0039 249 |
250 |
251 |
252 |
253 |
254 |
EO 255 |
_0 | _1 | _2 | _3 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F |
Criticism and humor
Open-source-software advocate and hacker Eric S. Raymond writes in his Jargon File that EBCDIC was almost universally loathed by early hackers and programmers. The Jargon File 4.4.7 gives the following definition:[5]
“ | EBCDIC: /eb´s@·dik/, /eb´see`dik/, /eb´k@·dik/, n.
[abbreviation, Extended Binary Coded Decimal Interchange Code] An alleged character set used on IBM dinosaurs. It exists in at least six mutually incompatible versions, all featuring such delights as non-contiguous letter sequences and the absence of several ASCII punctuation characters fairly important for modern computer languages (exactly which characters are absent varies according to which version of EBCDIC you're looking at). IBM adapted EBCDIC from punched card code in the early 1960s and promulgated it as a customer-control tactic (see connector conspiracy), spurning the already established ASCII standard. Today, IBM claims to be an open-systems company, but IBM's own description of the EBCDIC variants and how to convert between them is still internally classified top-secret, burn-before-reading. Hackers blanch at the very name of EBCDIC and consider it a manifestation of purest evil. |
” |
EBCDIC design was also the source of many jokes. One such joke went:
“ | Professor: "So the American government went to IBM to come up with an encryption standard, and they came up with—" Student: "EBCDIC!" |
” |
References to the EBCDIC character set are made in the classic Infocom adventure game series Zork. In the "Machine Room" in Zork II, EBCDIC is used to imply an incomprehensible language:
“ | This is a large room full of assorted heavy machinery, whirring noisily. The room smells of burned resistors. Along one wall are three buttons which are, respectively, round, triangular, and square. Naturally, above these buttons are instructions written in EBCDIC... | ” |
A similar description can be found in the "Maintenance Room" in Zork:
“ | This is what appears to have been the maintenance room for Flood Control Dam #3, judging by the assortment of tool chests around the room. Apparently, this room has been ransacked recently, for most of the valuable equipment is gone. On the wall in front of you is a group of buttons, which are labelled in EBCDIC. However, they are of different colors: Blue, Yellow, Brown, and Red. | ” |
See also
- EBCDIC-codepages with Latin-1-charset
- codepage 037 (English, Portuguese)
- codepage 285 (Ireland, United Kingdom)
- UTF-EBCDIC
References
- ↑ Bemer, Bob. "EBCDIC and the P-Bit". Retrieved July 2, 2013.
- ↑ They had 4 staff on the final 21-member ASA X3.2 sub-committee
- ↑ "...but their printers and punches were not ready to handle ASCII, and IBM just HAD to announce.", EBCDIC and the P-Bit, Bob Bemer
- ↑ IBMnt (2008). "IBM confirms the use of EBCDIC in their mainframes as a default practice". Retrieved 2008-06-16.
- ↑ "EBCDIC". Jargon File.
External links
- Character Data Representation Architecture (CDRA) from IBM Contains IBM's official information on codepages and charsets.
- F.0 Appendix F. Code Pages from AS/400 International Application Development V4R2
- ICU Converter Explorer Contains more information about EBCDIC derived from IBM's CDRA, including DBCS EBCDIC (Double Byte Character Set EBCDIC)
- ICU Charset Mapping Tables Contains computer readable Unicode mapping tables for EBCDIC and many other character sets
- ASCII/EBCDIC Conversion Table for HP 3000 MPE/iX Computer Systems
- EBCDIC character list, including decimal and hex values, symbolic name, and character/function
- iconv.com Online tool to convert from ASCII to/from EBCDIC
- EBCDIC-codepages with Latin-1-charset (JavaScript)
- EBCDIC and the P-Bit (The Biggest Computer Goof Ever)
|