EBCDIC
The way a mainframe stores letters and digits as numbers. It is not the way a laptop does it.
Also written character encoding
Why it matters. It matters when you sort text, and when you move a file between a mainframe and another computer.
Remember
- The same letter has a different number. A is X'C1' in EBCDIC and X'41' in ASCII.
- Sorting comes out in a different order. In EBCDIC, lower case sorts before upper case, and digits come last.
- A file moved between the two needs converting. The code page matters too: IBM-037 and IBM-1047 differ on a few marks, such as the square brackets.
The usual mistake
Text sorts in the same order on every computer.
On a mainframe, lower case sorts before upper case, and digits come last. A laptop using ASCII puts digits first, then upper case, then lower case.
Check the sort order on the mainframe. Don't assume it.
On real z/OS
MF/OS stores and sorts text in the ordinary way for a web page (ASCII order), so a sort, a compare or an ORDER BY there can come out in a different order from the same data on real z/OS. The EBCDIC order described here is not modelled.
Where can I practise EBCDIC?
Right here, at ZedBank. You take a junior job at a simulated bank and use EBCDIC in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- z/OSThe main operating system that runs on IBM mainframes, in the same way Windows or Linux runs on a laptop or server.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- File transferMoving data between the mainframe and other systems, where character encoding and record structure both need attention.