Expand description
The runtime a program compiled by ironwork links, and none of the compiler: it may depend on
numeric and zarch only. It is AGPL-3.0-or-later with the ironwork runtime exception
(RUNTIME-EXCEPTION.md), so a compiled program that links it is not bound by the AGPL.
module reads and writes the load modules such a program is shipped as.
Modules§
- abend
- The code an abend reports, as z/OS, CICS or ironwork names it, and the signals the interpreter passes up as errors to leave a statement early. With them, the I/O statuses FILE STATUS receives, and how a run ends.
- accept
- ACCEPT (lir.md §9.1): the date, day, weekday or time of the run unit’s clock, or a line of SYSIN, moved into the receiver.
- arith
- The arithmetic core (lir.md §7): one fixed-point or floating-point operation, exponentiation, DIVIDE’s remainder and the size-error decision. The executor walks the expression and makes the locate passes; dmax, the choice of floating point and ARITH are fixed by the plan.
- bms
- The mapset model BMS map source describes: each map’s fields with their positions, attributes and initial data, as SEND MAP and RECEIVE MAP use it.
- 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. - cics_
tables - IBM’s CICS tables, vendored from cobolwork’s provenance by tools/sync-cics-tables.sh: each command’s options with the direction their data moves, the numbers DFHRESP names, and the numbers DFHVALUE names.
- codec
- A numeric item’s storage read as generated code reads it. The interpreter and the SQL runtime share it, so a host variable sends exactly the value a COMPUTE would read.
- 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.
- display
- DISPLAY (lir.md §9.1): each item shown as its kind or value shows, then the line written to standard output.
- edit
- Editing: a numeric value laid into a numeric-edited PICTURE, alphanumeric data into an alphanumeric-edited one, and de-editing back to a number.
- 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. - feedback
- Language Environment feedback codes: the condition tokens of facility CEE and their symbolic names. The conditions are those the z/OS Language Environment Runtime Messages (SA38-0686-60, chapter 1) give a symbolic feedback code; the token is the case 1 layout of the Programming Reference (SA38-0683-60, CEENCOD and Table 20). Assumptions L16 and L17 record the sources and the choices where the manuals disagree.
- fileio
- The file statements (lir.md §9.4): OPEN, CLOSE, READ, WRITE, REWRITE, DELETE and START on one
file, FILE STATUS, LINAGE and the print carriage. A sequential file streams through its DD; an
indexed or relative file, or a sequential file opened I-O, is held in memory (
Keyed). Each verb returns the status its phrases or the file’s error path read; the executor runs those. - 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). - fixed
- Fixed-point helpers the storage semantics share: building, aligning and comparing
Fixedvalues, an item’s places, and zoned digits. - host
- What a statement’s semantics ask of the executor running it (semantics-library.md C6): a
handle’s
Locor value, evaluated where the walker would locate or evaluate it, and the stores.Pis the executor’s handle to a data item andOto any other operand: the LIR’sPlaceIdandOperandin the VM, the walker’s own references in the interpreter. - intrinsic
- The intrinsic functions’ semantics, apart from how an executor evaluates their arguments.
- jni
- The Java Native Interface as COBOL reaches it: the JNI environment structure, a pointer to the function table whose slots the JNI specification numbers, the first four reserved.
- json
- The text JSON GENERATE writes for elementary data (Language Reference SC27-8713-03, pp. 381-382).
- le
- Language Environment callable services (SA38-0683-60): which ones ironwork provides, their
condition tokens, Lilian dates and seconds, and the picture strings of the date and time
services.
servicesreads and writes a CALL’s arguments and runs each service. What the manual leaves open isnumeric::assumptionsL1 to L18. - linage
- LINAGE’s logical page at run time: where the printer is in the page body, and how far each
WRITE moves the paper past the footing area and the margins
(
numeric::assumptions::LINAGE_PAGE_MOVEMENT). - lir
- The LIR of docs/lir.md: a program lowered once, which the VM runs and a load module holds.
- loc
- Evaluating a data reference to a
Loc, over integers the executor has already evaluated: the base, subscripts, OCCURS DEPENDING ON, reference modification and the run-unit bound, each with its SSRANGE check and message (lir.md §5.4 and §5.5). - module
- The load module (
.iwm) of docs/load-module.md: its container, encoding rules and codec. - oo
- The run unit’s classes and objects, and the references a program holds to them.
Cis the executor’s handle to a loaded class definition, which the run unit keeps without looking inside.runruns INVOKE, SELF and the JNI services, withCanRc<ClassCode<H>>. - picture
- The symbols of an edited PICTURE.
- printer
- The control characters a WRITE to a print file puts out; which files are print files, and how,
is
compile::printer. - report
- The report writer (lir.md §9.6): the reports
compile::reportresolves, as Enterprise COBOL’s Report Writer Precompiler lays them out, and INITIATE, GENERATE, TERMINATE and SUPPRESS PRINTING over them (run). The model is generic over the executor’s handles:Xa SOURCE or SUM operand’s expression,Ca CONTROL item,Va VALUE or CODE literal,Ua USE BEFORE REPORTING procedure: the LIR’s comparands and ids by default, the walker’s own AST and paragraph spans in the interpreter. - reserved_
words - IBM’s reserved words, vendored from cobolwork’s provenance by tools/sync-reserved-words.sh: each word of Enterprise COBOL 6.4’s Reserved words appendix with the column IBM marks it in.
- set
- SET (lir.md §9.1): the
SetAddressandSetUpDownops, and the pointer rule of SET TO, which is otherwise a MOVE. SET TO TRUE and TO FALSE are MOVEs the executor resolves. SET TO ENTRY gives a function-pointer or procedure-pointer a value naming the entry a CALL through it enters. - sort
- SORT and MERGE.
Keysorders plain records under keys described as data, as DFSORT orders them, for any caller; the rest runs a program’s SORT, MERGE, RELEASE and RETURN and its table SORTs over aSortHost, with the keys as the program’s items describe them. - sql
- The SQL runtime: values at the database boundary, the host variables they come from and go to,
and EXEC SQL statements run against the session (
run, over the executor’sSqlHost). It reaches storage only as a byte range and a host type, so any executor can call it. - storage
- The storage vocabulary a program’s data shares: how an item is held, where it sits, and the values that move between items.
- store
- Storage and MOVE: an item’s bytes and value by its
Loc, numeric stores with their size-error and TRUNC(OPT) rules, MOVE, and the comparisons and class tests of conditions. - strings
- The byte-level work of STRING, UNSTRING and INSPECT, apart from storage and operands.
- terminal
- A 3270 display: its buffer of fields, the outbound data stream that writes it, the inbound Read Modified stream that reports what the operator changed, and a text rendering. The byte values are those of the 3270 Data Stream Programmer’s Reference (GA23-0059).
- text
- STRING, UNSTRING and INSPECT (lir.md §9.1) over the executor’s handles, in the walker’s order of
locates, reads and stores. The inputs are
lir::text’s plans with each receiver’s MOVE, store and step plan left to itsLoc’s kind, whichstoredecides by. - 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 run unit: every program a run calls, sharing one memory as they share an address space on z/OS. A called program keeps its WORKING-STORAGE and open files from one CALL to the next until it is cancelled. A reference or pointer can reach anywhere in this memory, but never outside it.
- virtual_
printer - The virtual printer. In a run given DD PRINTER, a CALL of SYSTEM or C$SYSTEM whose command prints files with lp or lpr appends those files to that DD, and nothing runs on the host. Each file the command names is a DD, as an ASSIGN literal names one, so the run still reaches only the files the operator gave it.
- vm
- The VM (codegen-runtime.md §14, step 3): runs a lowered program, and the programs it CALLs, over
the run unit, calling the semantics library the interpreter calls with the
Locs and values the interpreter would pass, so the two agree by construction. Control follows lir.md §8: frames and return points per activation (assumption C99), a dispatch loop over blocks, and Rust recursion for CALL and for a procedure a statement runs, bounded byMAX_DEPTHas the interpreter is. What this slice does not run stops the run asHalt::Unimplemented, never as an abend. - vocab
- The vocabulary the front end, the interpreter and a compiled program share: source positions and the small enums of the data division, INSPECT and OPEN.
- xml
- The events XML PARSE reports under XMLPARSE(XMLSS) (Language Reference SC27-8713-03, pp. 29-33, 489-494; Programming Guide SC27-8714-03, pp. 649-653). The document may arrive in segments: markup is held until it is complete, while character content, comments and processing-instruction data that a segment ends inside are reported in parts.
Macros§
- codec_
enum EncodeandDecodefrom the variants and their tags:Unit = 0,Named { a } = 1,Tuple(a) = 2.- codec_
struct EncodeandDecodefrom one field list;checknames afn(&T) -> Result<(), String>.