Expand description
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. Sequential files stream;
indexed and relative files are held in memory (see Keyed).
Structs§
- Dd
- Dds
- The DDs a run may use: given explicitly, or read from
DD_<NAME>in the environment. - Found
- A record READ found.
- KeySpan
- Where a key lies in a record.
- Keyed
- An indexed or relative file, or a sequential file opened I-O, held in memory from OPEN to CLOSE. The DD holds the records in key (or record-number) order, as an IDCAMS REPRO unload of a KSDS or RRDS does, and CLOSE writes them back that way when they changed.
- Open
Enums§
- Format
- Keying
- How the records of a file held in memory are keyed. Record numbers and positions are held as eight big-endian bytes, so that they sort.
- Record
- What a READ found.
Constants§
- MAX_
RELATIVE - The highest relative record number: past it WRITE is a boundary violation (status 24). It stands in for the space a cluster is defined with, so that a stray record number cannot make CLOSE write millions of empty slots.
Functions§
- absent
- An OPTIONAL input file with no DD: every READ is at end.
- number_
of - open
- open_
keyed - Opens a file held in memory. With no DD (an OPTIONAL file) or no file at the DD’s path, it
starts empty; OUTPUT always starts empty.
record_lenis the longest record. - record_
number