![]() Winner of the International SIA Best Application award |
TextPipe Pro is superb at converting multi-Gigabyte mainframe files.
Our end-user support is second-to-none. Click here to Download a FREE 30-Day Trial! |
Why EBCDIC conversion is more than a character swap
EBCDIC is the character encoding used on IBM mainframes and AS/400 systems. A plain code page translation turns the letters and digits into ASCII, but mainframe files usually contain more than text. Numeric fields are often stored as packed decimal (COMP-3), zoned decimal or binary integers, and a straight translation corrupts them. A single file may also hold several record types with different lengths, repeating groups defined with OCCURS, and overlapping layouts defined with REDEFINES.
TextPipe Pro reads the COBOL copybook that describes the file, so each field is converted according to its declared type. Text fields go through the EBCDIC to ASCII table, packed and zoned fields are expanded into readable numbers with the correct sign and decimal position, and binary fields are expanded from big endian or little endian form.
Example: an account record
Suppose a customer record is 40 bytes long. The first 10 bytes are an EBCDIC account name, the next 5 bytes are a packed decimal balance, and the last 8 bytes are a date. Viewed on a PC without conversion, the file shows unreadable symbols. After conversion with the copybook filter, the same record becomes one line of delimited output:
Input (hex): C1C3D4C5 40404040 4040 0001234C F2F0F2F4F0F3F1F5 Output (CSV): ACME,1234.56,20240315
The packed bytes 0001234C become the number 1234.56 because the copybook declares two implied decimal places, and the trailing C nibble marks a positive sign.
Typical uses
- Moving mainframe extracts into a data warehouse or SQL database as CSV, tab or pipe delimited files.
- Checking mainframe reports and spool files without needing access to the host.
- Splitting a mixed-record file into one output per record type before loading it elsewhere.
- Scripting a nightly conversion from the command line so files are ready each morning.
Related TextPipe pages
Checking the result
After a conversion, compare the record count of the output with the number of records in the source file, and spot-check a few packed decimal fields against a printout from the mainframe. Reports from the original system are the best reference for sign, scale and decimal position. Keep the copybook and the filter list with the converted data so the conversion can be repeated if the layout changes.
For multi-record copybooks, see converting COBOL copybooks to PC format and the guide to COMP-3 packed decimal conversion. Once the data is in CSV form, you can fix and restrict changes to CSV fields, split large files for Excel, or sort and de-duplicate the results. The banking and finance case study describes a large mainframe conversion, and the data conversion solutions page covers other formats. If the converted data later needs to be updated inside Word documents, WordPipe does batch search and replace on documents in the same way.
Watch this Demo
See also: Convert multiple record COBOL copybooks.
Try TextPipe for free. One-click Download. Setup takes only 1 minute
Installing TextPipe is a simple process that takes only 1 minute.
Need To Convert Data Right Now?
We offer a 90-day money back guarantee, and accept payment online via credit card, and offline via check, wire and purchase order.
Need More Information About TextPipe Pro?
Please click here. Converting Mainframe EBCDIC copybooks to PC format
