In native mode
a data-structure is represented by a series of logical records (LR).
These records are written and read by Fortran WRITE
and READ
statements.
Since indefinitly large records would cause problems in auxiliary programs, FZOUT will make sure that no record exceeds the maximum logical record size declared for the file with FZFILE, breaking a chunk of information into several records if necessary. Independently, the pilot record may not exceed 1024 words.
A data-structure starts with the 'pilot' record (type 2 or 3), which may be continued with 'pilot continuation' records (type 4) if necessary; this is followed by as many 'bank material' records as needed (type 7 for all except the last which has type 8).
word -1: NWLR, the number of words in this record, excluding the first two (!) words (except for padding records in exchange file format) word 0: logical record type LRTYP: LRTYP= 1: record 'start or end of run' 2: pilot record for d/s 'start of event' 3: pilot record for d/s 'event continued' 4: pilot continuation record 5 or 6: padding records, ignored on input, (not used in native mode) 7: bank material record, with more to come 8: last bank material record of a d/s 9: emergency-stop record words 1 -> NWLR: data words of the logical record
word -1: NWLR, the record length 0: LRTYP=1, the record type 1: NRUN, the run number, a positive integer NRUN=0 signals 'end-of-run' 2 -> NWLR: user information, integers only
A record LRTYP=1
with NRUN
positive may be used to mark the beginning
of a run; this is not obligatory.
A record LRTYP=1
with NRUN=0
may be used to signal the end of a run.
word -1: NWLR, record length limited to NWLR < 1020 0: LRTYP = 2 or 3, the record type 1: the floating point number 12345.0 as a check word 2: Zebra version number, integer = 10000. * QVERSIO zero if written by a user routine 3: processing option bits 4: zero (reserve word) 5: NWTX, number of words in the text-vector, may be zero 6: NWSEG, number of words in the segment table, = 3 * number of table entries if NWSEG=0: no table, but not necessarily empty d/s 7: NWTAB, number of words in the relocation table, = 2 * number of table entries if NWTAB=0: linkless data-structure 8: NWBK, total number of words occupied by the bank material, both on memory and on the file, may be zero if empty d/s 9: LENTRY, entry address into the d/s 10: NWUHIO = NWUH + NWIO, number of words in the user header vector plus its I/O characteristic, zero if no header 11: control-word for the I/O characteristic either: immediate, NWIO=1, the whole vector is of the same type = 1 all bits 2 all integer 3 all floating 7 self-decriptive or: complex, start of the I/O characteristic as delivered by MZIOCH, NWIO words in all 11 + NWIO: start of the user header vector, NWUH < 401 words 11+NWUHIO: start of the segment table, NWSEG words 11+NWUHIO+NWSEG: start of the text-vector, NWTX words 11+NWUHIO+NWSEG+NWTX: start of the relocation table, NWTAB words
If the text vector is too large to fit into the pilot record
it is written out as a separate LRTYP=4
continuation record:
word -1: NWTX 0: LRTYP=4 1: start of the text vector, NWTX words
The relocation table is written as a separate LRTYP=4
continuation
record (or even several such records in the very unlikely case
that the table is larger than the maximum record length) if:
word -1: NWTAB 0: LRTYP=4 1: start of the relocation table, NWTAB words
word -1: NWLR, the number of words in this record, excluding the first two words 0: LRTYP = 7 or 8, record type 1 -> NWLR: the bank material
The bank material is dumped directly in sequential order
into either one or several records;
all but the last record are given the type LRTYP=7
,
the last has LRTYP=8
.
Each entry has 3 words:
The table on the file gives first the names of the divisions for the segments, followed by the size indicators; in both cases in the order in which the segments occur on the file, which is also the order in which they where in memory at FZOUT time.
For example: suppose data from two divisions,
called 'BGO'
and 'CALORIM'
, where written.
Division BGO
was physically lower in the store at output time
and delivered 21469 words, whilst division CALORIM
gave 9199 words.
The segment table for this would consist of six words:
4HBGO , 4H , 4HCALO, 4HRIM , 21469, 9199
If all the bank material comes from one single division only the segment table is suppressed.
This is stored as a series of lines,
each line is preceded by a word-count indicating the number of
4-character Hollerith words to follow (this corresponds to the
MZIOCH format '/*H'
).
There is one entry for each contiguous section of memory, containing an integral number of banks, which has been written to the file. The entry consists of the original start address of the section, followed by the end+1 address. The entries follow each other in the table, thus:
word 1: start adr of first storage region 2: end+1 adr of first storage region 3: start adr of second storage region ... ... NWTAB: end+1 adr of last storage region