Expand description
ironwork for COBOL: an interpreter that runs a program ironwork-compile has checked and laid
out, in EBCDIC with the numeric model of ironwork-numeric.
Modules§
- abend
- calendar
- The proleptic Gregorian calendar: day counts, civil fields, Lilian days and the epoch offsets.
- cics
- The CICS region a harness run stands in for: one task, its files, its temporary-storage and
transient-data queues, and the time services; and the commands a program runs against it, as
CicsCommands the executor builds andruncarries out. - collating
- Collating sequences: the order an ALPHABET clause gives the single-byte characters. PROGRAM COLLATING SEQUENCE makes one the program’s, for its alphanumeric comparisons, HIGH-VALUE, LOW-VALUE, CHAR and ORD; the COLLATING SEQUENCE phrase makes one a SORT’s or MERGE’s.
- declaratives
- USE AFTER EXCEPTION/ERROR and USE FOR DEBUGGING procedures at compile time: the files, open
mode or procedures each serves, and the rules the Language Reference (SC27-8713-03) sets for
them. They run in
machine::declaratives. - digest
- SHA-256 (FIPS 180-4) that hashes a stream in blocks, so a data set is digested without being held in memory, and HMAC-SHA-256 (RFC 2104). Written here because the runtime takes no dependencies.
- evidence
- Run journals in cobolwork’s evidence format (cobolwork
docs/spec/evidence.md§4-6), so one verifier reads both tools: each record is canonical JSON hashed as SHA-256(“cobolwork-evidence/v1\n” || record without “hash”), chained byprevandseq, and each closed run adds its tip toledger.jsonl. Nothing written holds source text or a secret. - files
- Files. ASSIGN names a DD, and only the operator maps a DD to a host file, as JCL does, so a
program reaches no file it was not given. A binary DD holds z/OS records byte for byte:
fixed-length records back to back, or variable-length records each behind a 4-byte RDW. A text
DD holds UTF-8 lines, converted through the program’s code page, and placed as a printer would
place them (
Open::print). Sequential files stream; indexed and relative files are held in memory (seeKeyed). - layout
- WORKING-STORAGE as IBM lays it out: sizes by USAGE and PICTURE, REDEFINES sharing storage,
OCCURS repeating it, SYNCHRONIZED slack bytes before an item and after each occurrence, and
level-66 RENAMES over what is laid out. See
numeric::assumptions::WORKING_STORAGE_LAYOUTfor where each 01 level starts. - le
- Language Environment callable services are
rt::le; the CALL side that builds their arguments is machine/le_services.rs. - lir
- The LIR of docs/lir.md: a program lowered once, which the VM runs and a load module holds.
- loader
- The interpreter’s program loader: the programs CALL can reach, read from source and compiled the first time one is called.
- lower
- Lowering (docs/lir.md): a compiled program with every name resolved, every category decided and every transfer of control made explicit, as the LIR a VM runs and a load module holds.
- machine
- The interpreter: one activation of one program, over the run unit’s memory in EBCDIC. A reference can reach anywhere in that memory, as a program compiled without SSRANGE can on z/OS, but never outside it.
- module
- The load module (
.iwm) of docs/load-module.md: its container, encoding rules and codec, and the modules a run loads programs from. - oo
- Where a class definition is found. The run unit’s objects and classes, and running them, are
rt::oo; compiling and checking a class iscompile::oo. - picture
- printer
- Which files are print files, and how, is
compile::printer; the control characters a WRITE puts out arert::printer. - report
- The report writer’s model, which
compile::reportbuilds andrt::reportruns. - sql
- The SQL runtime is
rt::sql, with the host type of a declared item fromcompile::sql. - terminal
- rt’s 3270 terminal, with its AID bytes checked against the DFHAID copybook
syntaxserves. - tn3270
- A
Terminalover a TCP connection speaking TN3270 (RFC 1576): telnet negotiation of the terminal type, EOR and BINARY, then 3270 data streams as records ended by IAC EOR. - unit
- The interpreter’s run unit:
rt::unit’s, holding each loaded program as itsCompiledand calling through theLibrary. - vm
- Running on the VM (
rt::vm): CALL’s loader over load modules and the interpreter’s program library, lowering each program it compiles from source, and the run itself, of a compiled program asExecute::execute_observedmakes the interpreter’s, or of a load module’s.
Structs§
Enums§
Traits§
- Execute
- Running a compiled program, in a run unit of its own or as a CICS task.
Functions§
- compile
- Checks and lays out a parsed program.
flagsare this compiler’s own, such as-silent. A program is refused, with every message, when one stops its object code: under IBM’s default NOCOMPILE(S) one that is S or U, from W under-warnings-block, or as a CBL or PROCESS card’s COMPILE or NOCOMPILE says; otherwise its messages areCompiled::diagnostics. - compile_
at - Compiles as
compiledoes, WHEN-COMPILED givingat. - compile_
time - When a compile happens: SOURCE_DATE_EPOCH’s seconds when the build sets it, the reproducible-builds convention, and the clock otherwise.
- entry_
points - The ENTRY statements of a program, each a sentence of its own paragraph’s.
- read_
lengths - The shortest and longest variable-length record a READ of file k takes without a record length
conflict: under VLR(STANDARD) its level-01 records’, under VLR(COMPAT) its RECORD IS VARYING
clause’s, where a bound the clause leaves out is the level-01 records’ (Programming Guide
SC27-8714-03, pp. 422-424; Language Reference SC27-8713-03, pp. 187, 300, 431). See
numeric::assumptions::VLR_WITHOUT_VARYINGandnumeric::assumptions::VLR_RECORDS_CHECKED. - variable_
records - Whether file k’s records vary in length: RECORDING MODE V, RECORD IS VARYING, a RECORD clause with two bounds, or, with neither RECORDING MODE nor RECORD, level-01 records of different lengths or with an OCCURS DEPENDING ON table, an SD’s as well (Language Reference SC27-8713-03, p. 191; Programming Guide SC27-8714-03, pp. 227-228).