master slider blank master slider blank

Convert mainframe Cobol copybook files to formats suitable for Windows databases

Import 5 million COBOL mainframe
records in 60 Seconds with TextPipe!1

Trusted by over 2600 IT professionals & companies worldwide2

NASA
Hewlett-Packard
Boeing
Pfizer
Accenture
US Department of Defence
Automated stream editor

What TextPipe can do for you

Convert, Transform, Cleanse & Extract data in text files

Convert file formats and encodings
Cleanse unstructured data
Extract data from XML, HTML, CSV, Tab and more

Convert Enormous Files Quickly and Easily

TextPipe handles files of unlimited size, from 2 Gigabytes to 2 Petabytes!
Other applications attempt to load the entire file into memory, grinding your system to a halt
Perform Data Warehouse ETL (Extract-Transfer-Load) Tasks

Specify all text processing filters in one place (stream editing)

Combined power of awk, sed, grep, perl
Save filters for later use, include pre-defined filters
Self-documenting - you WILL understand what you (or others) did last week!

How it works

Awesome key Features

Why TextPipe?

icon-image Exceptionally fast
icon-image Handles files of unlimited size
icon-image Multi-award winning
icon-image Perform multiple operations simultaneously
icon-image Prompt support
icon-image Cost-effective
icon-image One text tool to rule them all

Reading COBOL data files with a copybook

A COBOL data file has no column headings, delimiters or line breaks. It is a continuous run of bytes in which every record has the same length, and the meaning of each byte comes from a copybook, which is a text file of data definitions written for the COBOL compiler. Without the copybook, the file cannot be interpreted. With it, you know that bytes 1 to 6 are an account number, bytes 7 to 26 are a name, and so on. TextPipe reads the copybook directly, so you do not have to calculate offsets by hand.

Real copybooks are not just a list of simple fields. A REDEFINES clause lets the same bytes be read in two ways. An OCCURS clause creates repeating groups, such as twelve monthly totals, and OCCURS DEPENDING ON makes the number of repeats vary from record to record. A single file may also hold several record types, for example a header, many detail records and a trailer, each with its own layout. TextPipe lets you choose the layout for each record type by testing a field value, and writes each type to its own output file or as separate sections.

Sample input and output

This copybook describes an order file with a repeating group:

01 ORDER-REC.
   05 ORDER-NO     PIC 9(5).
   05 CUST-NAME    PIC X(10).
   05 LINE-COUNT   PIC 9(2).
   05 LINE-ITEM OCCURS 2 TIMES.
      10 SKU       PIC X(4).
      10 QTY       PIC 9(3).

After conversion from EBCDIC, one record of 31 characters looks like this:

00417SMITH CO  02AB12005CD34010

Written as CSV with one row per line item, so that the repeating group becomes rows that a database can store, the output is:

00417,SMITH CO,AB12,005
00417,SMITH CO,CD34,010

The order number and customer name are repeated on each row, which is the form that relational tables expect.

Typical settings

  • Copybook file: load it, then check the calculated record length against the length reported by the mainframe job.
  • Source encoding: EBCDIC for most mainframe files, ASCII for files produced by Micro Focus or other PC COBOL compilers.
  • Record selection: pick the layout by the value of a record type field, and skip header and trailer records if they are not wanted.
  • Output: CSV, tab-delimited, fixed width or XML, with one row per record or per repeating group entry.

Practical applications

Insurers and banks move policy and account history from mainframe systems into data warehouses. Government departments convert old payroll and tax files before a system is retired. Auditors read mainframe extracts directly, instead of waiting for a report to be written. Software vendors import customer data from legacy systems when a client switches to their product.

Common pitfalls

  • A copybook that has been edited for a different program version may no longer match the data. Test on a small file and compare a few records against a printed report.
  • Compiler options such as SYNC add padding bytes between binary fields. Make sure the same alignment is applied when reading.
  • Signed numeric fields with SIGN SEPARATE or SIGN LEADING are stored differently from the default. Set the matching option.

Related pages

Numeric fields stored as packed decimal are covered on the COMP-3 packed data conversion page and in the packed decimal feature guide. For character conversion, see EBCDIC to ASCII. The banking and finance case study and the data conversion solutions page show complete projects.

Select your Edition

TextPipe has editions for every need

Professional

Developers / DBAs / Data Analysts
$399 / year 1 Year Free
Upgrades

EBCDIC/Mainframe file handling

COBOL Copybooks

Ultra-fast processing speed

Automation - CLI/COM

Most Popular

Floating

Development Teams
$499 / year 1 Year Free
Upgrades

All features of Pro

EBCDIC/Mainframe file handling

Share across teams

Automation - CLI/COM

Multi-CPU / App Server

Enterprise Data
$699 / year 1 Year Free
Upgrades

All features of Pro

Multiple instance

Utilize multiple CPUs

Automation - CLI/COM

TextPipe Case Studies

TextPipe is used across a broad range of industries

Banking and Finance
Banking & Finance
Cobol conversion / Documenting code
Systems Integrators
Database Consulting
Systems Integrators/High Tech
Print and Publishing
Print and Publishing &
Mail Houses

TextPipe Awards3

Winner of the SIA award as Best Application!
Excellent (5/5)
Excellent (5/5)
tucows5
Excellent (5/5)
5 Star Editor's Pick at ZDNet
seenonrocketdownload_black
EditorsPickAward
5star_filehungry
Excellent (5/5)
GET STARTED TODAY

FREE 30-DAY TRIAL

  1. Results are typical for a user with a modern workstation
  2. These are real user testimonials. Your results may vary
  3. Awards may no longer be present on the referred websites