EBCDIC
Extended Binary Coded Decimal Interchange Code is an eight-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It 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. It is supported by various non-IBM platforms, such as Fujitsu-Siemens' BS2000/OSD, OS-IV, MSP, and MSP-EX, the SDS Sigma series, Unisys VS/9, Burroughs MCP and ICL VME.
History
EBCDIC 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 eight-bit character encoding, developed separately from the seven-bit ASCII encoding scheme. It was created to extend the existing Binary-Coded Decimal Interchange Code, or BCDIC, which itself was devised as an efficient means of encoding the two zone and number punches on punched cards into six bits. The distinct encoding of 's' and 'S' was maintained from punched cards where it was desirable not to have hole punches too close to each other to ensure the integrity of the physical card.While IBM was a chief proponent of the ASCII standardization committee, the company did not have time to prepare ASCII peripherals to ship with its System/360 computers, so the company settled on EBCDIC. The System/360 became wildly successful, 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. Software and many hardware peripherals can translate to and from encodings, and modern mainframes 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, 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 IBM Z, and operating systems running on the IBM PC and its descendants use ASCII, as did AIX/370 and AIX/390 running on System/370 and System/390 mainframes.
Compatibility with ASCII
There were numerous difficulties to writing software that would work in both ASCII and EBCDIC.- The gaps between letters made simple code that worked in ASCII fail on EBCDIC. For example would print the alphabet from A to Z if ASCII is used, but print 41 characters in EBCDIC. Fixing this required complicating the code with function calls which was greatly resisted by programmers.
- Sorting EBCDIC put lowercase letters before uppercase letters and letters before numbers, exactly the opposite of ASCII.
- Programming languages and file formats and network protocols designed for ASCII quickly made use of available punctuation marks (such as the curly braces
Code page layout
The table below shows the "invariant subset" of EBCDIC, which are characters that should have the same assignments on all EBCDIC code pages. It also shows missing ASCII and EBCDIC punctuation, located where they are in code page 037. Unassigned codes are typically filled with international or region-specific characters in the various EBCDIC code page variants, but the characters in gray are often moved around or swapped as well. In each cell the first row is an abbreviation for a control code or the character itself; and the second row is the Unicode code.
Definitions of non-ASCII EBCDIC controls
Following are the definitions of EBCDIC control characters which either don't map onto the ASCII control characters, or have additional uses. When mapped to Unicode, these are mostly mapped to C1 control character codepoints in a manner specified by IBM's Character Data Representation Architecture.Although the default mapping of New Line corresponds to the ISO/IEC 6429 Next Line character, most of these C1-mapped controls match neither those in the ISO/IEC 6429 C1 set, nor those in other registered C1 control sets such as ISO 6630. Although this effectively makes the non-ASCII EBCDIC controls a unique C1 control set, they are not among the C1 control sets registered in the ISO-IR registry, meaning that they do not have an assigned control set designation sequence.
Besides U+0085, the Unicode Standard does not prescribe an interpretation of C1 control characters, leaving their interpretation to higher level protocols, so this mapping is permissible in, but not specified by, Unicode.
Mnemonic | EBCDIC | CDRA pairing | Name | Description |
SEL | 04 | 009C | Select | Device control character taking a single-byte parameter. |
RNL | 06 | 0086 | Required New Line | Line-break resetting mode |
GE | 08 | 0097 | Graphic Escape | Non-locking shift that changes the interpretation of the following character. Compare ISO/IEC 6429's . |
SPS | 09 | 008D | Superscript | Begin superscript or undo subscript. Compare ISO/IEC 6429's . |
RPT | 0A | 008E | Repeat | Switch to an operation mode repeating a print buffer |
RES/ENP | 14 | 009D | Restore, Enable Presentation | Resume output |
NL | 15 | 0085 | New Line | Line break. Default mapping matches ISO/IEC 6429's. Mappings sometimes swapped with Line Feed in accordance with UNIX line breaking convention. |
POC | 17 | 0087 | Program Operator Communication | Followed by two one-byte operators that identify the specific function, for example a light or function key. Contrast with ISO/IEC 6429's , and . |
UBS | 1A | 0092 | Unit Backspace | A fractional backspace. |
CU1 | 1B | 008F | Customer Use One | Not used by IBM; for customer use. |
IUS/ITB | 1F | 001F | Interchange Unit Separator, Intermediate Transmission Block | Either used as an information separator to terminate a block called a "unit", or used as a transmission control code to delimit the end of an intermediate block. |
DS | 20 | 0080 | Digit Select | Used by S/360 CPU edit instruction |
SOS | 21 | 0081 | Start of Significance | Used by S/360 CPU edit instruction. |
FS | 22 | 0082 | Field Separator | Used by S/360 CPU edit instruction. |
WUS | 23 | 0083 | Word Underscore | Underscores the immediately preceding word. Contrast with ISO/IEC 6429's SGR. |
BYP/INP | 24 | 0084 | Bypass, Inhibit Presentation | De-activates output, i.e. ignores all graphical characters and control characters besides transmission control codes and RES/ENP, until the next. |
SA | 28 | 0088 | Set Attribute | Marks the beginning of a fixed-length device specific control sequence. Deprecated in favour of. |
SFE | 29 | 0089 | Start Field Extended | Marks the beginning of a variable-length device specific control sequence. Deprecated in favour of. |
SM/SW | 2A | 008A | Set Mode, Switch | Device specific control that sets a mode of operation, such as a buffer switch. |
CSP | 2B | 008B | Control Sequence Prefix | Marks the beginning of a variable-length device specific control sequence. Followed by a class byte specifying a category of control function, a count byte giving the sequence length, a type byte identifying a control function within that category, and zero or more parameter bytes. Contrast with ISO/IEC 6429's and . |
MFA | 2C | 008C | Modify Field Attribute | Marks the beginning of a variable-length device specific control sequence. Deprecated in favour of. |
30 | 0090 | ' | Reserved for future use by IBM | |
31 | 0091 | ' | Reserved for future use by IBM | |
IR | 33 | 0093 | Index Return | Either move to start of next line, or terminate an information unit. |
PP | 34 | 0094 | Presentation Position | Followed by two one-byte parameters to set the current position. Contrast with ISO/IEC 6429's CUP and HVP. |
TRN | 35 | 0095 | Transparent | Followed by one byte parameter that indicates the number of bytes of transparent data that follow. |
NBS | 36 | 0096 | Numeric Backspace | Move backwards the width of one digit. |
SBS | 38 | 0098 | Subscript | Begin subscript or undo superscript. Compare ISO/IEC 6429's . |
IT | 39 | 0099 | Indent Tab | Indents the current and all following lines, until or is encountered. |
RFF | 3A | 009A | Required Form Feed | Page-break resetting mode. |
CU3 | 3B | 009B | Customer Use Two | Not used by IBM; for customer use. |
3E | 009E | Reserved for future use by IBM | ||
EO | FF | 009F | Eight Ones | All ones character used as filler |
Code pages with Latin-1 character sets
The following code pages have the full Latin-1 character set. The first column gives the original code page number. The second column gives the number of the code page updated with the euro sign replacing the universal currency signCCSID | Euro update | Countries |
037 | 1140 | Australia, Brazil, Canada, New Zealand, Portugal, South Africa, USA |
273 | 1141 | Austria, Germany |
277 | 1142 | Denmark, Norway |
278 | 1143 | Finland, Sweden |
280 | 1144 | Italy |
284 | 1145 | Latin America, Spain |
285 | 1146 | Ireland, United Kingdom |
297 | 1147 | France |
500 | 1148 | International |
871 | 1149 | Iceland |
1047 | 924 | Open Systems |
Criticism and humor
advocate and software developer Eric S. Raymond writes in his Jargon File that EBCDIC was loathed by hackers, by which he meant members of a subculture of enthusiastic programmers. The Jargon File 4.4.7 gives the following definition:EBCDIC design was also the source of many jokes. One such joke went:
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: