Skip to main content

Crate ironwork_exec

Crate ironwork_exec 

Source
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 and run carries 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 by prev and seq, and each closed run adds its tip to ledger.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 (see Keyed).
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_LAYOUT for 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 is compile::oo.
picture
printer
Which files are print files, and how, is compile::printer; the control characters a WRITE puts out are rt::printer.
report
The report writer’s model, which compile::report builds and rt::report runs.
sql
The SQL runtime is rt::sql, with the host type of a declared item from compile::sql.
terminal
rt’s 3270 terminal, with its AID bytes checked against the DFHAID copybook syntax serves.
tn3270
A Terminal over 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 its Compiled and calling through the Library.
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 as Execute::execute_observed makes the interpreter’s, or of a load module’s.

Structs§

Abend
Compiled

Enums§

Ending

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. flags are 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 are Compiled::diagnostics.
compile_at
Compiles as compile does, WHEN-COMPILED giving at.
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_VARYING and numeric::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).