Skip to main content
This guide builds a two-step job: SORT orders an input data set, then a COBOL program totals it. Needs harwell:runs:write.

1. The program

Progs/TOTAL.cbl:
ASSIGN TO PAYIN names a DD. The job binds each DD to a data set.

2. The job

Procs/PAYJOB.jcl:

3. The input data set

Each file in CATALOG/ is a data set, named by its data set name. A fixed-format data set holds fixed-length records with no newlines between them.
_geometry.json declares each data set’s record length and format, as the job that created it would have. A file that is exactly N lines of LRECL bytes is read as N records with the newlines dropped. The result’s seed: line says how each data set was read.

4. Run it

PAY.TOTAL is written. The resource links carry each step’s SYSOUT and the job log.

5. Check the output

An ORACLE/ directory states the expected end state, and the result then carries a verdict.
Run it again. The last line of the text reads oracle: passed. Change ADAMS 00050 to 00051 in CATALOG/PAY.INPUT and run it again: the oracle names PAY.TOTAL and the record and byte where it first differs, and the call is a tool error. ORACLE/ can also hold jobs.json ({"PAYJOB": "ok"}), expected Db2 tables, data sets that must not exist, and expected screens. See Unit format.

6. Run several jobs

A chain runs many jobs under one clock, each after the jobs it names. It replaces submit in run.json. CHAIN/chain.json:
Each name is a deck in Procs/. A job whose predecessor failed is blocked and does not run. tolerate lists return codes that still count as ok. Rerun a chain from the job that failed with resume: true and the work_id of the failed run.

7. Set the clock

Programs read the date and time from the run clock, never the host’s. Set it in run.json:
The same unit run with the same clock gives the same result.

Next