ironwork · Docs
Install ironwork, and use every command it has.
The reference for ironwork 0.9.0, the latest release: install, the commands and their flags, CBL and PROCESS cards, compliance and dialects, messages, evidence, and exit statuses. ironwork --help prints the same commands and flags.
Install
Install from a registry, or build from source
One command installs ironwork from the registry you already use.
Each gives the same ironwork command. ironwork --version prints ironwork for COBOL 0.9.0.
cargo install ironwork
| Registry | Command | What it installs |
|---|---|---|
| crates.io | cargo install ironwork | A build from source with your Rust toolchain |
| PyPI | pip install ironwork | A prebuilt binary, for Python 3.8 or later |
| npm | npm install -g @portll/ironwork | A prebuilt binary, for Node.js 18 or later |
| GitHub | Release v0.9.0 | An archive per target, the TLS build’s archives, the npm tarball and SHA256SUMS |
Prebuilt targets
The packages run on Linux, macOS and Windows without a Rust toolchain.
The PyPI and npm packages and the GitHub release carry the same builds:
- Linux, static:
x86_64-unknown-linux-muslandaarch64-unknown-linux-musl. - macOS:
aarch64-apple-darwinandx86_64-apple-darwin. - Windows:
x86_64-pc-windows-msvc.
TLS to PostgreSQL
--sql-db reaches a database over TLS with the TLS build.
TLS is a second build in tls/, on rustls, which keeps the main build free of dependencies outside the workspace. Each GitHub release carries it as the ironwork-tls-0.9.0-<target> archives. Over TCP it connects with sslmode=verify-full unless the URL says sslmode=disable.
Limit: sslmode=verify-full needs the TLS build.
From a checkout
What is on main runs from a clone.
cargo run -p ironwork -- run program.cblbuilds and runs.cargo build --release -p ironworkwritestarget/release/ironwork.--manifest-path tls/Cargo.tomlbuilds the TLS binary.
Commands
Commands and the flags each takes
One binary checks, runs and compiles programs, runs jobs and CICS tasks, and fuzzes and compares programs.
A flag a command does not take is refused as usage. Shared flags are under Run flags, and the CICS, job and fuzz flags in their own sections.
| Command | What it does |
|---|---|
run <program.cbl> | Compiles a program and runs it on the VM, or on the interpreter with --interpret. CBL and PROCESS cards set the options-silent -strict-sort-keys -warnings-block -debug --fastsrt-adv-print --cics-return-warning --optimize -I -L --vm --interpret --dd --clock --parm --argument --arguments-out --statement-limit --time-limit --storage-limit --exit-code --sql-db --sql-record --sql-replay --sql-replay-mode --compliance --dialect --assume --diagnostics --program-scope --unresolved-calls --le-services --screens --env --provenance --evidence --coverage --trace-marker --trace-input --trace-statements |
run <module.iwm> | Runs a load module’s first program on the VM, with the options it was compiled with. The compile flags, --provenance and --argument are refused, since they describe a compile-I -L --dd --clock --parm --statement-limit --time-limit --storage-limit --exit-code --sql-db --sql-record --sql-replay --sql-replay-mode --coverage --evidence --trace-marker --trace-input --trace-statements |
check <program.cbl> | Compiles only, and exits with the compile’s return code-warnings-block --cics-return-warning -I --compliance --dialect --assume --diagnostics --program-scope --unresolved-calls --le-services --provenance --evidence |
cics <program.cbl> | Runs a program as the first program of a CICS task, with run’s flags and those under CICS |
cics <module.iwm> | Runs a load module’s first program on the VM as the first program of a CICS task, with run’s flags for a module but --parm and --statement-limit. --serve takes a source |
compile <program.cbl>… | Compiles each source and generates its programs’ code into one load module: PAYROLL.cbl gives PAYROLL.iwm. A source that does not compile, or whose code cannot be generated, writes nothing, and a module is written whole or not at all. The same source, libraries and options give the same bytes; FUNCTION WHEN-COMPILED holds the compile time, which is SOURCE_DATE_EPOCH’s when it is set-o --bundle --source-prefix -silent -strict-sort-keys -warnings-block -debug --fastsrt-adv-print --cics-return-warning --optimize --diagnostics --compliance --dialect --assume -I -L --program-scope --unresolved-calls --le-services |
dump <module.iwm> | Prints a load module, one fact per line: a header, the section table, then STRINGS, DIRECTORY, OPTIONS, LAYOUT, LIR, SQL, BMS and DEBUG--section --strings --no-check |
job <job.jcl> | Runs a job’s steps in order, with its data sets in a directory. See Jobs |
fuzz <program.cbl> | Runs a batch program on generated input and keeps each abend. --job, --cics and --interface choose another mode, and --differential compares the interpreter with the VM on each input, alone or with --cics or --interface. See Fuzzing |
compare --base OLD.cbl --head NEW.cbl | Runs two versions of a program on copies of the same inputs and writes an in-toto equivalence statement. See Evidence--base --head --dd --sql-replay --clock --expected --declare --statement |
assumptions | Lists the register of assumptions, one per line: id, basis, oracle and claim, separated by tabs. --c-series puts each entry’s number in one C series first, with its own id beside it, and --json writes the register as one JSON array, each entry with the statement kinds, usages and options it governs |
--version, --help | Print the version, or every command and flag. -V and -h work too |
A flag’s value is the next argument. --compliance, --dialect, --assume and --diagnostics also take =VALUE; --optimize, --fastsrt-adv-print and --cics-return-warning take only =VALUE.
Run flags
Libraries, files, the clock and the database
A run reaches only the copybooks, programs and files its command line gives, as a z/OS job reaches only its DDs.
| Flag | What it does |
|---|---|
-I <dir> | A copy library, searched for COPY members after the program’s own directory. A copybook (.cpy, .copy) comes before a program source (.cbl, .cob), and either before a file named as the member alone, which a COPY of a literal name tries first. Repeatable |
-L <dir> | A program library. CALL finds a program by name after the programs in the same source or module and the program’s own directory, and failing that in the .cbl or .cob file whose PROGRAM-ID it is. On the VM, CALL takes NAME.iwm before NAME.cbl. A dynamic CALL can name only such a member, never a path. Repeatable |
--dd NAME=path[:format][:mod] | The file a DD names, as JCL would give it; DD_NAME in the environment works too. Binary files hold z/OS records, fixed or variable behind 4-byte RDWs, which :fixed and :variable name. :text reads and writes UTF-8 lines through the code page. :mod is DISP=MOD. An indexed or relative file’s DD holds its records in key order, as a REPRO unload does. DD SYSIN is what ACCEPT reads, or standard input without it |
--clock YYYY-MM-DDTHH:MM:SS[.hh] | The time ACCEPT FROM DATE and TIME, FUNCTION CURRENT-DATE and the Language Environment time services report. Without it they report the system clock in UTC |
--parm TEXT | With run, the PARM an EXEC PGM= would give, at most 100 characters: the first USING item addresses a halfword length and the arguments before the last slash, as Language Environment passes them under CBLOPTS(ON) |
--argument path|OMITTED | With run, once per PROCEDURE DIVISION USING item in order: runs the program as a subprogram a caller passed the file’s bytes to, or a null address. Not with --parm |
--statement-limit N | With run, job or cics, ends the run with S322 at the statement after the Nth to start, as z/OS ends a step that runs past its TIME=. Each job step and each task gets N |
--time-limit SECONDS | With run, job or cics, ends the run with S322 at a statement that starts once SECONDS have passed. Each job step and each task gets SECONDS; there is no limit without it |
--storage-limit BYTES[K|M|G] | With run, job or cics, ends the run with an IRONWORK abend at the next statement once the run unit’s storage, its programs’ data, arguments, EXTERNAL data and heap, passes BYTES. There is no limit without it, and each CICS GETMAIN or CEEGTST grants at most 256 MiB |
--env NAME=VALUE | Under --compliance extended, an environment variable ACCEPT … FROM ENVIRONMENT reads. The run sees these, and those it sets, never the process’s own. Repeatable |
--arguments-out DIR | With --argument, writes each argument as the run left it, the bytes the caller sees after its CALL, to DIR/arg1, DIR/arg2 and on in USING order when the run ends, by an abend too. An OMITTED argument has no file |
--interpret | With run and cics, runs the program on the interpreter. Without it the program’s code is generated and runs on the VM: a program code generation refuses runs on the interpreter, with a line naming what was refused, and a run that reaches what the VM does not run yet stops there with a message naming it and exits 243. The --coverage report and --evidence journal are those the interpreter’s run writes. job runs each step, and cics --serve each task, on the interpreter |
--vm | With run and cics, the VM only: a program code generation refuses exits 242. Not with --serve |
--program-scope strict|flexible | Which contained programs a CALL reaches: strict, the default, keeps Enterprise COBOL’s scope rules, a nested program reached only from the program containing it unless it is COMMON, and refuses two programs of one compilation sharing a name (IWC0295); flexible reaches any program by its name |
--unresolved-calls run|fail | A static CALL naming no program of its compilation, or of its --bundle, nor a Language Environment service: run, the default, compiles it as a CALL found when it runs; fail refuses it (IWC0296), as IBM’s binder does |
--le-services programs|bind | A CALL of a Language Environment service’s name: programs, the default, reaches a program of that name when the run has one; bind always reaches the service |
--exit-code | With run, cics and job, exits with a verdict, 0 to 5 or 70, as cobolwork’s --exit-code does. See Exit status |
-silent | Stops the checked-mode reports, of TRUNC(OPT) stores whose result depends on the generated code and of SORTs whose outcome FASTSRT changes. What is stored does not change |
-strict-sort-keys | Reads a SORT or MERGE key as the program would, so a zoned or packed key that is not a valid number abends S0C7. Without it, keys compare as DFSORT’s ZD and PD formats compare them |
--fastsrt-adv-print=exclude|include | Whether FASTSRT gives DFSORT the I/O of a USING or GIVING print file under ADV. exclude, the default, leaves it to COBOL |
-debug | The Language Environment runtime option DEBUG: a program compiled WITH DEBUGGING MODE runs its USE FOR DEBUGGING procedures. NODEBUG, IBM’s default, keeps them from running |
--sql-db postgres://… | Runs EXEC SQL against PostgreSQL, postgres://user[:password]@host[:port]/database, with host=, sslmode=disable|verify-full and sslrootcert= options; the password may come from PGPASSWORD. A normal end commits and an abend rolls back |
--sql-record path | With --sql-db, writes each call and its answer to the file, for --sql-replay |
--sql-replay path | Answers EXEC SQL from a recording instead of a database. A call the recording does not hold next abends SQLR, naming both calls |
--sql-replay-mode strict|keyed | strict, the default, answers call n from the recording’s call n; keyed answers each call from the first unused recorded call with the same statement and inputs |
Compiler options
CBL and PROCESS cards
A program carries its compiler options in its source, on CBL and PROCESS cards, as it does for IBM’s compiler.
The cards come before the program. A card may be in lower case and may carry a sequence number in columns 1 to 6; its options are separated by commas or spaces, and a suboption list in parentheses stays whole. The options apply in the order written, with IBM’s spellings, abbreviations and defaults, from IBM’s table of 85 options: AR(E) is ARITH(EXTEND) and CP(1047) is CODEPAGE(1047).
The options that change what a program computes, with their defaults, are in the Compiler options table on Features.
CBL TRUNC(OPT),NUMPROC(PFD) ARITH(EXTEND)
PROCESS SSRANGE
IDENTIFICATION DIVISION.
| Card or flag | When a run is refused |
|---|---|
none, or NOCOMPILE(S) | From return code 12, IBM’s default |
NOCOMPILE(W), (E) | From the first message of that severity |
COMPILE | From return code 12, as NOCOMPILE(S) |
NOCOMPILE | Always: a syntax check, exit 241 |
-warnings-block | From return code 4, as NOCOMPILE(W); a card’s COMPILE or NOCOMPILE wins over it |
None of these changes the return code. --optimize=0|1|2 gives the compiler invocation’s OPTIMIZE level, and a card’s OPTIMIZE wins over it. A load module keeps the options it was compiled with.
Compliance and dialects
Compliance level, dialect and switched assumptions
A program is held to Enterprise COBOL by default, and a migration can read other compilers’ forms or compare with GnuCOBOL’s results.
run, check, cics, compile, job, fuzz and compare take --compliance.
--compliance strict|extended
strict, the default, refuses what Enterprise COBOL refuses.
extended reads the Micro Focus and GnuCOBOL extensions below, each with a warning naming it and where it is, so check returns 4, and runs them:
- Free-form source, level-78 and CONSTANT entries,
<>, literal concatenation with&, BINARY-SHORT, -LONG and -DOUBLE, and PROGRAM-ID with no IDENTIFICATION DIVISION header:IWX0001-WtoIWX0006-W. - ASSIGN to a data item:
IWX0007-W. - An integer or numeric function as a MOVE’s sender:
IWX0008-W. - PROCEDURE DIVISION RETURNING OMITTED:
IWX0009-W. - ACCEPT FROM COMMAND-LINE, ARGUMENT-NUMBER and ARGUMENT-VALUE, read from the PARM:
IWX0010-W. - An EXEC SQL INTO name without its colon:
IWX0011-W.
--dialect ibm|gnucobol
A migration sees only the differences that matter to it.
Where ironwork knowingly computes a different result from GnuCOBOL’s cobc -std=ibm-strict, ibm, the default, gives Enterprise COBOL’s as the register of assumptions reads it, and gnucobol gives cobc’s. Seven assumptions switch:
- C101: a ROUNDED receiver’s extra decimal place reaches only a statement’s last operation.
- C14, C95: DISPLAY of packed and binary items, and of numeric literals.
- C15: ACCEPT at the end of SYSIN moves a space.
- C51: an ENTRY name shares its program’s storage.
- C180: a shorter EXTERNAL record shares the run unit’s.
- C262: two unsigned zoned items of one length compare by their bytes at every OPTIMIZE level.
--assume ID=VALUE
One assumption switches alone, whatever the dialect.
Each of the seven takes ibm or gnucobol, and C101 also off, its extra place counted in no operation. The flag is repeatable, the last for an id winning, and an assumption with no alternative is refused by name. The choice is kept in the load module, the provenance statement and the journal.
docs/compliance.md gives each extension’s meaning and what stays refused; docs/dialect.md lists each switched assumption and every other difference found from cobc. On main at 072930a, extended reads more forms, among them SCREEN SECTION screens, and the catalogue holds 33 IWX messages.
Messages
Message ids and severities
A build reads each compile message by its id and severity, in text or JSON.
Every compile message opens with its id from ironwork’s catalogue: IW, the area’s letter, four digits, and the severity it was given, matching IW[A-Z][0-9]{4}-[IWESU]. Once released, an id keeps its meaning and is never given to another message. docs/messages.md lists all 863 messages of 0.9.0, with each one’s severity and text.
IDENTIFICATION DIVISION.
PROGRAM-ID. UNDEF.
PROCEDURE DIVISION.
MOVE 1 TO Y
GOBACK.
undef.cbl:4:22: IWC0001-S Y is not defined
12
{"col":22,"file":"undef.cbl","id":"IWC0001","line":4,"member":null,"message":"Y is not defined","severity":"S"}
Severities
Each message has one of IBM’s five severities, and the compile’s return code is the highest.
| Severity | Return code | run and cics |
|---|---|---|
| I, informational | 0 | run the program |
| W, warning | 4 | run it; refuse under -warnings-block |
| E, error | 8 | run it |
| S, severe | 12 | refuse |
| U, unrecoverable | 16 | refuse |
Every refusal ironwork makes is S. A refused run exits 241, and standard error gives the return code.
Areas
The letter after IW says which part of the compile spoke.
- S: source form, lexing, COPY and REPLACE, and syntax.
- C: Enterprise COBOL’s compile rules.
- O: CBL and PROCESS options, and compiler flags.
- P: EXEC SQL, EXEC CICS, EXEC DLI, BMS and CSD.
- R: an Enterprise COBOL construct ironwork does not run yet, refused by name.
- L: ironwork’s own limits.
- X: an extension
--compliance extendedreads. - J: JCL a job run refuses.
Text lines
A parser tells a warning from an error by the word after the position.
Messages go to standard error, errors first, then warnings, then informational messages: path:line:col: ID-S message, path:line:col: warning: ID-W message and path:line:col: informational: ID-I message, or path: alone for a message with no position. E, S and U lines carry no severity word; the id’s last letter is the severity. path is the program as given, or the COPY member the position is in.
--diagnostics json
A build reads messages as JSON, one object a line.
On check, run, cics and compile, each message is an object with its keys sorted: col, file, id without the severity letter, line, member (the COPY member, or null), message and severity. line and col are null for a message with no position. Every other line on standard error is written as text.
On main at 072930a, the job runner’s JCL, IDCAMS and DFSORT messages carry IWJ ids, and the catalogue holds 820 messages.
Evidence
Run journals, provenance and equivalence
A run leaves a hash-chained journal that a third party can verify with cobolwork’s evidence tools.
--evidence DIR writes DIR/runs/<runId>.jsonl and appends the run’s tip to DIR/ledger.jsonl. The records are cobolwork’s cobolwork-evidence/v1 format, so cobolwork evidence verify, seal and anchor work on the directory unchanged. No record holds a record’s data, an option’s value or an absolute path.
| Flag or command | What it records |
|---|---|
--evidence DIR | The source and every COPY member by digest, each DD’s digest when it is opened, closed and at the end, each program CALL loads, and the abend or RETURN-CODE. On run, check, job and cics for one task, not --serve. DIR may not be inside the program’s directory or a library. A job’s journal adds the JCL, each step’s DDs and CALLs, and a record of each step’s outcome |
--trace-marker TEXT | With --evidence, on run, job and cics: each operation an input could steer, such as a CALL of a variable program name or a DISPLAY, and whether TEXT was in its operand. Enter TEXT where the input comes in: SYSIN, a DD, the COMMAREA or a replayed row |
--trace-input | With --evidence, on run and cics: follows which bytes may hold input through each statement, and records at each operation --trace-marker names whether an input byte may be in its operand: true, false, or null where the run did something not followed yet, such as SORT or the Report Writer |
--trace-statements FILE | With --evidence, on run and cics: each start of a statement FILE lists, one FILE:LINE a line, as cobolwork’s routes.statements gives them. The first 100 starts of each are recorded, the 100th marked capped |
--coverage FILE | On run, cics and job: every paragraph of each program with its line and how often control entered it, and the paragraphs reached in each program CALL loaded from a library |
--provenance FILE | On run and check: an unsigned in-toto statement with the SLSA Provenance v1 predicate, holding the source and every COPY member by digest, the option cards, the options in force, and ironwork’s version and digest |
compare --base OLD.cbl --head NEW.cbl | Runs each version in its own directory on copies of every DD, with the same clock (2026-01-01 without --clock), SYSIN and recording. --expected NAME=path compares the head’s DD with a file instead of a base run, --declare file lists the divergences the change means to make, and --statement file is where the in-toto statement goes, standard output without it |
job --expected DATASETS=DIR | Migration equivalence: runs the job on a copy of --datasets with a fixed clock, and compares each file in DIR byte for byte with the data set the job left. --expected STEPS=file adds production’s step outcomes, one a line (STEP RC=0004, STEP ABEND S0C7) |
A journal’s last record, close, holds exit: the compile’s return code for check, a run’s own RETURN-CODE even where the exit status gives it as 239, and otherwise the code of the reserved band. --exit-code does not change it. docs/evidence.md gives every record kind and its fields.
Jobs
Job runner
A job runs off the mainframe, step by step, against a directory of data sets.
Each EXEC PGM= runs a COBOL program found in -L as PGM.cbl or PGM.cob, IEFBR14, IEBGENER without control statements, IDCAMS, or SORT and ICEMAN. DISP creates, keeps and deletes data sets as each step ends, and COND and IF/THEN/ELSE choose the steps. A step’s DISPLAY output and SYSOUT DDs go to standard output, and a line per step to standard error. What the job uses that ironwork does not run is refused before any step runs.
| Job flag | What it does |
|---|---|
--datasets DIR[:text] | Required. DSN=A.B is the file DIR/A.B and DSN=A.B(M) the file DIR/A.B/M. They hold z/OS records, or UTF-8 lines with :text; in-stream data and SYSOUT are always lines |
--proclib DIR | A procedure library, searched for cataloged procedures and INCLUDE members after the data sets JCLLIB ORDER names: member M is DIR/M or DIR/M.jcl. Repeatable |
--user ID | The user ID that submitted the job: &SYSUID’s value when the JOB statement gives no USER= |
--step-parm STEP=TEXT | The PARM step STEP gets in place of its EXEC’s, STEP as the job log names it |
--instream STEP.DD=path | The lines of path in place of the in-stream data of DD in step STEP |
--expected, --declare, --statement | Migration equivalence, under Evidence |
job also takes -I, -L, --clock, --sql-replay, --exit-code, --statement-limit, --time-limit, --storage-limit, --evidence, --trace-marker, --trace-input, --coverage and the compile flags. --dd, --sql-db, --provenance and the CICS flags are refused, since a job takes its DDs from the JCL. JOBLIB and STEPLIB are not allocated.
CICS
CICS task
A CICS transaction runs as a task with no region, scripted or on a 3270 emulator.
The program runs as the first program of a task, with the transaction, terminal, user and COMMAREA the command line gives. What runs is on Features under CICS.
| CICS flag | What it does |
|---|---|
--transid, --termid, --userid, --applid, --sysid | Who and what started the task, as EIBTRNID, EIBTRMID and ASSIGN report them |
--commarea path[:text] | The COMMAREA the task starts with, EBCDIC bytes or UTF-8 text. EIBCALEN is its length, and 0 without it |
--commarea-out path[:text] | Where RETURN’s COMMAREA is written |
--task-out path | A line of JSON for each task of the run that ends without an abend: its number and transaction, RETURN’s TRANSID and COMMAREA, and its temporary-storage and transient-data queues, each item in hexadecimal. A --td queue’s items are in its file instead |
--file NAME=path,KSDS,key=OFFSET:LENGTH,len=RECLEN--file NAME=path,RRDS,len=RECLEN | A CICS file, with ,text or ,variable after it where its data set is lines or variable-length. The data set holds the records in key order, as a REPRO unload does, and is written back when the task ends |
--td QUEUE=path | A transient-data queue, appended to path as text lines when the task ends |
--screens path | A 24 by 80 3270 terminal played from a script: type ROW COL text, eof ROW COL, cursor ROW COL, home, tab, string text, and an AID key (ENTER, CLEAR, PA1 to PA3, PF1 to PF24) ending each turn. Every screen the task sends is printed. A task that returns TRANSID is followed by that transaction’s task |
--serve HOST:PORT | A TN3270 server, one terminal at a time until interrupted, instead of a script. Not with --screens, --commarea or --commarea-out |
--serve-public | Serves an address other than loopback. The server asks for no credentials |
--transaction TRAN=PROGRAM | With --serve or --screens, the program a transaction runs: one of the source’s, or one found through -L |
--csd path | With --serve or --screens, the region’s transactions from a CICS system definition, as DFHCSDUP reads it. --transid and --transaction win over it |
Fuzzing
Generated input and kept abends
Each abend a program’s generated inputs cause is kept once, with the smallest input that gives it.
-o DIR is required: a new or empty directory outside the program’s directory and its libraries. It receives manifest.json, evidence/ with the journal of a run on each kept input, and coverage/, as cobolwork’s abend rule set reads them. --dd, --evidence, --coverage and the SQL flags are refused, since fuzz makes its own inputs, DDs, evidence and coverage.
| Mode | What it runs, and what it keeps |
|---|---|
fuzz program.cbl | A batch program on the files it OPENs INPUT or I-O, built field by field from their record descriptions, SYSIN lines, and a PARM. Each abend is kept once by code and place, but one the program gives on empty input |
--job job.jcl | A job through ironwork job, feeding each data set a COBOL step reads before any step creates it, each in-stream DD a COBOL step reads, and the PARM of each COBOL step whose program takes one. Takes --datasets, --proclib and --user |
--cics | The program as a CICS task, on a generated COMMAREA and an operator’s typing into the maps it RECEIVEs. Takes --transid, --termid, --userid, --applid, --sysid, --transaction, --csd, --file and --td |
--interface | A subprogram as a caller would run it, its USING items built from its LINKAGE records and shaped by the CALLs that pass them |
--differential | Each input on the interpreter and on the VM, keeping each input on which they differ in exit status, abend, standard output, standard error or a DD’s data set, with the command that repeats it; with --cics each task’s COMMAREA and queues, and with --interface each argument after the CALL. A run that ends at the statement limit is compared too. Exits 1 when any input differs |
| Fuzz flag | Default | What it sets |
|---|---|---|
--runs N | 200 | How many generated inputs to run |
--seed N | 1 | The generator’s seed; the same seed gives the same inputs |
--timeout SECONDS | 10 | How long one run may take before it is stopped and counted a timeout |
--hang-limit N | 10000000 | The statements each run may start. A run past them ends S322, kept as a loop the input caused unless the empty input’s run loops there too or the run had found SYSIN at its end |
--root DIR | the current directory | The repository root the manifest names the program from |
--clock | 2026-01-01T00:00:00 | The time every run reports |
Fuzz also takes -I, -L and the compile flags. One of --job, --cics and --interface at a time; --differential goes with --cics or --interface, or alone. docs/evidence.md §5 gives the manifest’s format.
Exit status
Exit statuses and abends
A CI step tells a program’s RETURN-CODE from a run ironwork refused, stopped or could not finish.
run, cics and job keep 239 and above for the ends ironwork gives a run.
| Status | How the run ended |
|---|---|
| 0–238 | It ran to its end: the program’s RETURN-CODE, a job’s highest step return code, or 0 for a CICS task |
| 239 | It ran to its end with a RETURN-CODE outside 0–238, or of 239. Standard error gives the value, as ironwork: RETURN-CODE 1000 exits 239 |
| 240 | An abend, which the message names: a system or user completion code, a CICS abend code, an I/O status nothing handled, or SQL or SQLR. For a job, a step’s abend or a JCL error |
| 241 | The compile gave no program to run: its return code reached the refusal level, NOCOMPILE asked for a syntax check, or the source holds only user-defined functions |
| 242 | Code generation refused a construct, named with where it is, under --vm; without it the run falls back to the interpreter |
| 243 | The VM stopped at a construct it does not run yet, naming it and saying to run the program with --interpret |
| 244 | The run reached a construct ironwork does not run, an IRONWORK, EXEC or JAVA abend, or the job holds JCL ironwork refuses before any step |
| 245 | The source, JCL or load module cannot be read, or the reader refuses the module |
| 246 | Usage, or a file, directory, address or database a flag names cannot be used |
| 255 | An internal error: ironwork panicked, or could not make a scratch directory |
| Status | Verdict under --exit-code |
|---|---|
| 0 | It ran to its end with RETURN-CODE 0 |
| 1 | Another RETURN-CODE, which standard error and the journal give |
| 2 | Usage, or an input that cannot be read (246, 245) |
| 3 | An abend (240) |
| 4 | Refused by the compile or code generation, or a construct ironwork does not run (241, 242, 244) |
| 5 | Stopped: the VM does not run a construct yet (243) |
| 70 | An internal error (255) |
undef.cbl:4:22: IWC0001-S Y is not defined
ironwork: undef.cbl: the program does not run: the compile's return code is 12
241
Other commands
The other commands exit with their own results.
checkandcompile: the compile’s return code, 0, 4, 8, 12 or 16;compilegives 12 for a program code generation refuses and 16 for a source it cannot read or a module it cannot write.compareandjob --expected: 0 equivalent, 1 diverged, 3 inconclusive.dump: 1 for a module the reader refuses, a section that does not decode or a checksum that differs, and 2 for a file that cannot be read.--no-checkprints a section whose checksum differs.fuzz --differential: 1 when any input differs.
Each exits 2 for usage, and 16 if ironwork panics.
Abends, exit 240
An abend carries the completion code z/OS gives.
S0C7: a data exception.S0C4: a LINKAGE item with no address, or a reference beyond the run unit’s storage.S806: a job step whose program no library holds. A dynamic CALL of a missing program endsU4038with CEE3501S, and a static one stops with the binder’s IEW2456E.S0CB,S0C9,S0CF: a zero divisor no ON SIZE ERROR takes, as the division is decimal, binary or floating-point.S322: a run past--statement-limitor--time-limit.U0999from CEE3ABD with code 999, andU4038for a Language Environment condition nothing handled, with its message: IGZ0035S for an OPEN or CLOSE that failed, IGZ0037S for a main program run past its last line, IGZ0050S for zero raised to a negative power, IGZ0156S and its kin for an intrinsic function’s argument outside its domain, CEE3501S for a missing program.- A CICS abend code, such as
AEILorASRA. SQLfrom the database andSQLRfrom its recording.
ironwork’s own, exit 244
A run that reaches what ironwork does not run ends and says what it reached.
EXEC: an EXEC statement with nothing to run it, such as EXEC DLI.JAVA: a Java class reached.IRONWORK: the rest, INVOKE in a CICS task among them.
docs/run-endings.tsv lists the statuses from 240 up and the abend codes that exit 244, for a tool that reads how a run ended.
Documents
Documents at the release tag
Each link names the tag of release 0.9.0, the release this page describes.
| Document | What it holds |
|---|---|
| README.md | Install, the commands, the exit statuses, compiler messages, the subset the interpreter runs, code pages, the oracle, the licence and the tests |
| docs/messages.md | Every compile message by id, with its severity and text, generated from crates/syntax/src/messages.rs |
| docs/compliance.md | Each extension --compliance extended reads, how they were chosen, and what stays refused and why |
| docs/dialect.md | What --dialect gnucobol and --assume switch, how to check against cobc, and the differences found and not switched |
| docs/evidence.md | The run journal and its records, build provenance, compare, job --expected, and the output of fuzz |
| docs/run-endings.tsv | The exit statuses from 240 up and the abend codes that exit 244 |
| docs/fuzz-manifest.schema.json, fuzz-interface-manifest.schema.json | The JSON Schemas of a fuzz run’s manifest.json |
| docs/load-module.md | The .iwm load module format, how a run unit loads it, and ironwork dump |
| docs/lir.md | The LIR the VM runs: its types, the ops each construct becomes, how code generation is checked, and the printed form dump shows |
| docs/codegen-runtime.md | Code generation ahead of time, and the runtime compiled programs link |
| docs/sql-runtime.md | EXEC SQL at run time: host variable conversion, the SQLCA, units of work, record and replay, and the PostgreSQL backend |
| docs/exec-sql-cics.md | How EXEC SQL and EXEC CICS are handled, and the decisions behind it |
| docs/semantics-library.md | The semantics library, and the split of the runtime crate rt out of the interpreter |
| docs/benchmarks.md | Four programs timed under the interpreter, the VM and GnuCOBOL |
| docs/verifier.md | The design of a verifier for high-assurance builds, which is not built |
| docs/roadmap.md | What cobolwork and ironwork each own, where they overlap, and the priorities |
| tls/README.md | The TLS build for --sql-db |
| RELEASING.md | The steps of a release, and the registries each publishes to |
| STABILITY.md | What holds from 1.0: the command, its flags and exit statuses, message ids and the formats at version 1; what a minor may change; and what carries no promise |
| SECURITY.md | Supported versions, how to check and rebuild a download, every limit with its default, and the processes ironwork starts |
| docs/witness.md | The witness deck a licensed site runs against Enterprise COBOL, the record ironwork-oracle witness writes of it, and the ledger of records received |
| docs/conformance/ | The census, the Hercules reading, the differential campaign and the NIST baseline the conformance report is built from |
| docs/releases/0.9.0.md | The notes of this release, and of each before it beside it |
| LICENSING.md, RUNTIME-EXCEPTION.md | The licences, and the runtime exception that leaves programs you compile, check or run with ironwork outside the AGPL |