COBOL copybooks · SQL, CSV, Excel · Windows desktop software

COBOL Copybook to SQL, CSV & Excel

Point Universal File Converter at a COBOL copybook and a data file, and it builds the field layout from the PIC clauses for you. No counting byte positions by hand. Convert to CSV, Excel, XML, DBF, fixed-width text or a SQL table.

Try It Free for 14 Days See Plans & Pricing

14-day free trial · 20 conversions, first 500 records each · no credit card

How it works

From copybook and data file to converted output

Every mainframe extract file has a copybook somewhere, a data-division layout that defines where each field starts and how wide it is. Transcribing those PIC clauses into position and length pairs by hand is slow, and one miscounted byte shifts every field after it.

1

Choose the copybook

Select a .cpy, .cbl or .cob file in the EDI & COBOL Conversion window (EDI menu).

2

Choose the data file

Select the mainframe data file the copybook describes. Positions are computed from the PIC clauses.

3

Pick the output

CSV, Excel, XML, DBF, fixed-width text or a SQL table.

4

Convert

Run the conversion. No manual field-position counting.

What the parser understands

PIC clauses, groups and OCCURS

PIC X / A / 9, V and S

Alphanumeric, alphabetic and numeric-display fields get the correct byte width. Implied decimals (V) and signs (S) are handled with no phantom bytes.

Nested groups

The full group hierarchy is walked and only the PIC-bearing leaf fields are emitted, with byte offsets accumulating correctly through every level.

OCCURS

OCCURS N TIMES is expanded into N flat, numbered fields, at both field and group level.

FILLER and REDEFINES

FILLER bytes are counted but not emitted, so every field after lands in the right place. A redefining field is skipped from the flat output while the byte position holds.

Honest limits: COMP and COMP-3 (packed and binary) fields have their byte length computed so later fields stay in position, but the field itself is deliberately not emitted, because reading raw packed or binary bytes as text would produce garbage. Each skipped field is listed by name in the import summary. OCCURS DEPENDING ON (variable-length groups) is not supported; it is detected and skipped with a warning rather than silently mis-parsed. REDEFINES support covers the common case, and a redefine that targets an earlier field in a different group can produce incorrect positions.

Verify before you convert

Visual field mapping preview

Paste one representative line of your data into the preview and a character ruler lines up underneath it. Click the start and end of a field to define it, and already-defined fields show as colored highlights, so overlaps and gaps are visible before a conversion produces garbled output. After a copybook import, this turns "the parser says this is byte 47" into "I can see byte 47 lands where I expect." More detail on the EDI & COBOL page.

Also converting healthcare EDI? See EDI 835/837 to SQL.

Questions

COBOL copybook conversion: common questions

Which copybook file types are supported?

Files with the extensions .cpy, .cbl and .cob.

Can it convert packed decimal (COMP-3) fields?

No. Packed and binary fields are not emitted, because reading the raw bytes as text would produce garbage. Their byte length is still reserved so the fields after them stay correctly positioned, and each skipped field is listed in the import summary.

What output formats can I convert to?

CSV, Excel, XML, DBF, fixed-width text or a SQL table.

How do I check that the layout is right?

Use the visual field mapping preview: paste a sample line from your data and confirm the highlighted fields land where you expect.

Is my data uploaded anywhere?

No. Universal File Converter is a native Windows desktop application (Windows 10 and 11, 64-bit). Files are processed on your own computer; no browser or cloud service is required.

Can I try it first?

Yes. The free trial lasts 14 days with no credit card. It is the Standard edition, limited to 20 conversions of the first 500 records each, and it can be used once. Purchases carry a 30-day money-back guarantee.

Stop counting COBOL byte positions by hand

Standard $19.99 per month, Lifetime $249.99 one-time, or Professional $49.99 per month per site. Start with the free trial.

Try It Free for 14 Days EDI & COBOL details