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

Test data generator

Paste a copybook and get a valid test file of any size, with values you can fix per field.Use this when you need a test file of any size that matches a copybook, with packed, zoned and binary fields that really decode.

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

What it does

Reads a copybook and writes a valid test file of the size you choose, with values you can fix per field.

How to use it

  1. Paste the copybook, or press Example.
  2. Set the record count, format and code page; fix values per field if you want.
  3. Press Generate, then download the file.

What it cannot do

  • It uses the first 01 record of the copybook.
  • It does not apply VALUE clauses or rules between fields; fix those fields yourself.
  • It does not check that your system accepts the file.

1 · COPYBOOK · paste the layout
first 01 record is usedon this device

2 · File settings

The same copybook and seed always give the same file.

3 · Fixed values (optional)

The file is made here in your browser and saved to your device; nothing is uploaded. The first records are shown as a table so you can check the values before you download.

Covers: Packed (COMP-3), zoned, binary (COMP) and text fields of the first 01 record of your copybook, including OCCURS tables, in fixed (FB) or variable (VB) files, in the code page you choose.

ACCURACY · CHECKED AGAINST IBM RULES

Sizes follow the same copybook rules as the copybook viewer, and every field is written by the encoders the record decoder reads back; round-trip tests check both. The values are made up and follow no business rules. Confirm that your program accepts the file.

What it checks

  • ConfirmedEvery generated field is written with the same encoders that the record decoder reads back, so the file decodes to the values shown in the table.
  • ConfirmedThe same copybook, record count, seed and settings always produce the same file.
  • ConfirmedRecord lengths come from the copybook sizing rules; a VB file gets a 4-byte record descriptor word on every record.
  • ConfirmedFixed values, number ranges and value lists you give for a field are checked against the field's picture before anything is written.
  • ConfirmedText is converted with the code page you choose; a value the code page cannot hold is refused with a message.

What it does not check

  • UnsupportedVALUE clauses, level-88 conditions, REDEFINES views other than the first, and OCCURS DEPENDING ON counts below the maximum are not generated.
  • UnsupportedFloating point, pointer, index, national, double-byte and edited pictures are written as zeros or spaces.
  • UnsupportedBusiness rules between fields (for example a date that must follow another date) are not modelled; use fixed values for those fields.
  • Depends on your systemWhether your program or system accepts the file (data set attributes, target character set, block descriptors) is not checked.

Source

  • The site's own copybook viewer and record decoder 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

  • Copybook text: 200,000 characters.
  • Up to 100,000 records and 50 MB per file; a larger request is cut to the limit and the page says so.
  • The table shows the first 10 records.

EXAMPLE INPUT

       01  ORDER-REC.
           05  ORDER-ID        PIC 9(6).
           05  CUSTOMER-NAME   PIC X(20).
           05  STATUS-CODE     PIC X(1).
           05  ORDER-TOTAL     PIC S9(7)V99 COMP-3.

Fixed values: STATUS-CODE = A|B|C

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'