How to use this tool
What it does
Reads a COBOL copybook and lists every field with its start position, length and type, plus the total record length.
How to use it
- Paste your COBOL copybook, or press Example.
- The table appears as you paste; no button is needed.
- Read each field's start, length and type, and the record length.
What it cannot do
- It does not expand COPY or REPLACE and does not show RENAMES.
- It measures the layout from the text; the compiler's own storage map is final.
- Next tool: Record decoder ▸ Read a data file with this copybook.
- Guide: all the guides
- Code page: S0C7 data exception
Your copybook is kept in this browser to save retyping. Clear it or keep it for this tab only on the Privacy page.
Level numbers 01-49, 66, 77 and 88; PIC, USAGE, OCCURS (DEPENDING ON), REDEFINES, SIGN and SYNC are understood. Sequence numbers in columns 1-6 and 73-80 are ignored.
Not covered: this viewer reads the data layout only. It does not expand COPY or REPLACE, show RENAMES (level 66), or apply VALUE, BLANK WHEN ZERO or JUSTIFIED. Edited and floating-point pictures are measured but not converted, and COMP-1 and COMP-2 are read as hexadecimal floating point, not IEEE. SYNC padding follows IBM's rule but is still an estimate, so check it against the compiler's map. The compiler options TRUNC and NSYMBOL are not applied, and a plain PIC N is read as national text. Double-byte text is shown as hex. For a table with OCCURS DEPENDING ON, items after it are placed after the actual table length, but SYNC alignment of those items is not recomputed for smaller counts. Always compare the result with your compiler's own storage map before relying on it.
DECODE A DATA FILE WITH THIS COPYBOOK ▸
Hands this copybook text to the record decoder on this device. You then choose the data file there; nothing is changed or sent anywhere.
ACCURACY · CHECKED AGAINST IBM RULES
Sizes follow Enterprise COBOL storage rules (PIC, COMP, COMP-3, OCCURS, REDEFINES) and are covered by known-answer tests. SYNC slack bytes are an estimate (confirm with the compiler MAP listing), and compiler options such as TRUNC are not modelled.
Check it yourself in one minute
- Open your browser's developer tools: in Chrome or Edge press F12 or right-click and choose Inspect; in Firefox press Ctrl+Shift+E for the Network Monitor; in Safari first turn on Show features for web developers under Settings, Advanced. Then open the Network tab.
- Keep the log across page loads (Chrome: Preserve log; Firefox: Persist Logs), then use the tool: paste your text or open a file and press the button.
- Look at the list. You will see only this page and its own files, loaded when the page opened. Nothing new appears when you use the tool.
- Still unsure? Switch Wi-Fi off and try again. The tool still works.
What the badge counts: requests the browser logged after this page finished loading, other than the site's own files. It reads the browser's own record and makes no request of its own. If your browser cannot give that record, the badge says so. The badge is a convenience; the developer tools are the proof.
The rule that enforces it
Every page carries this Content Security Policy. The browser itself refuses any request outside it; connect-src 'none' blocks fetch, XHR and WebSocket.
default-src 'none';
script-src 'self';
style-src 'self';
img-src 'self' data:;
font-src 'self';
connect-src 'none';
object-src 'none';
form-action 'none';
base-uri 'none';
manifest-src 'self';
worker-src 'self'Suggest a tool or report a wrong answer · How it works and why it is safe
No mail app opens? Write to hello@mainframepath.com . Please do not send confidential code or data.