Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

Copybook compare

See which fields were added, removed, moved or resized between two copybook versions.Use this when a copybook changed and you want to know which fields moved or changed size, and what the new record length is.

Checked against IBM rulesON THIS DEVICE · NOTHING UPLOADEDCounting requests…
How to use this tool

What it does

Compares two versions of a copybook and lists fields that were added, removed, moved or resized.

How to use it

  1. Paste the first version of the copybook in box A.
  2. Paste the second version in box B.
  3. Read the fields that were added, removed, moved or resized.

What it cannot do

  • COPY and REPLACE are not expanded.
  • It cannot say whether a change breaks a program; compare real data files for that.

A · COPYBOOK (before)
on this device
B · COPYBOOK (after)
on this device

Covers: Every 01 record of two copybooks, matched by record name, and the fields inside them, matched by qualified name, with offset, length, usage, picture, OCCURS and REDEFINES.

ACCURACY · CHECKED AGAINST IBM RULES

Offsets and lengths come from the copybook viewer's sizing rules, which are covered by known-answer tests. COPY members are not expanded. The page lists differences between the two texts; it does not say whether a program is affected.

What it checks

  • ConfirmedFields are matched by qualified name; a field present in only one copybook is listed as added or removed.
  • ConfirmedA field whose only change is its offset is listed as moved; a field with a different name at the same position is listed as renamed.
  • ConfirmedLevel, offset, length, usage, picture, OCCURS and REDEFINES are compared for every matched field.
  • ConfirmedThe record length of each 01 record is compared, using the copybook viewer's sizing rules.
  • ConfirmedCopybook errors found while reading either side are listed before the differences.

What it does not check

  • UnsupportedCOPY and REPLACE are not expanded, so fields brought in by COPY are not seen.
  • UnsupportedVALUE clauses and level-88 conditions are not compared.
  • Depends on your systemWhether the change breaks a program or a file that uses the copybook; compare real files with the Mainframe Migration Checker (Quick compare).

Source

  • The site's own copybook viewer rules, as recorded in docs/FACTS.md

Checked against IBM rules. Status labels: Confirmed Depends on your system Unsupported (a rule with an official source; depends on your catalog, security, installation defaults or compiler options; not parsed and shown instead of guessing).

Input limits and example

  • Each copybook: 200,000 characters.
  • Up to 5,000 fields per record are compared, and up to 1,000 differences are listed; the counts cover everything.

EXAMPLE INPUT

       01  CUSTOMER-REC.
           05  CUST-ID    PIC 9(6).
           05  CUST-NAME  PIC X(20).

versus the same record with CUST-ID PIC 9(8)

Check it yourself in one minute

  1. 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.
  2. 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.
  3. 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.
  4. 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'