The logical records of the exchange file format look much like those of the native mode, except that a data-structure may be represented by a single LR of type 2 or 3. LR type 4 is used for bank material continuation, LR types 7 and 8 do not exist.
word -1: NWLR, the number of words in this record, excluding the first two (!) words, except: excluding the first word only for padding records for NWLR = 0 the LR type 5 is implied word 0: logical record type LRTYP: LRTYP= 1: record 'start or end of run' 2: (start of) data-structure 'start of event' 3: (start of) data-structure 'event continued' 4: data-structure continued 5 or 6: padding records, ignored on input, 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' NRUN =-1 signals 'Zebra end-of-file' 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: length NWLR = 10 + NWIO + NWUH + NWSEG + NWTX + NWTAB + NWBKST (bank material in this record) 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 = 0 normally 1 Direct-access-Table record 2 DaT forward reference record 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 7: NWTAB, number of words in the relocation table, = 2 * number of table entries, if = 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 word 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
The 10 words of basic pilot information are followed by these data sectors:
NWBK
A decription of the contents of the segment table, the text vector, and the relocation table is found in the format decription of the native mode. The bank material is a direct copy (but normally transformed to exchange data format) of the data in the dynamic store.
word -1: NWLR, the record length 0: LRTYP=4, the record type 1 -> NWLR: further bank material
Padding records must be used to mark unused areas of physical records.
word 0: NWLR, the record length (excluding the first word only!) 1: LRTYP = 5 or 6, the record type 2 -> NWLR: words to be ignored on input
The total size of a padding record is NWLR+1
,
including the LR length and the LR
type;
thus a padding record with NWRL=1
occupies two words.
To pad exactly one word, NWRL=0
should be stored,
in this case the LR
type 5 is implied
without being present in the data.
The maximum size of a padding record is the size of a physical record.
There must not be more than 4 consecutive padding records.
A file in exchange file format is supported by physical records of
identical length (fixed-length records), this being the only
format which can safely be read on all machines.
A physical record consists of NWPHR
words;
the word size is 32 bits for the Exchange Data Format,
for the Native Data Format it is the word size of the machine.
The physical record size NWPHR
is 900 words standard,
but a different size may be specified at OPEN time.
For the Exchange Data format, NWPHR
must be a multiple of 90 words,
ie. 360 bytes = 64x5x9 bits,
this being the smallest size compatible with all machines.
The following table shows, for the Exchange Data Format,
some possible values of NWPHR
, being multiples of 90 words.
On machines with a word size of more than 32 bits the apparent
record size, which may be needed in JCL, will be less;
this is also shown, supposing that packing is dense.
n NWPHR bytes is words of 36 48 60 64 bits 1 90 360 80 60 48 45 10 900 3600 800 600 480 450 20 1800 7200 1600 1200 960 900 40 3600 14400 3200 2400 1920 1800 50 4500 18000 4000 3000 2400 2250 64 5760 23040 = 512*45 5120 3840 3072 2880 80 7200 28800 6400 4800 3840 3600
Note: with Zebra version 3.61 the '90 word rule' has been relaxed such that the size of physical recods is required to be a multiple of 30 words only. One should not take advantage of this if one has 36-bit machines in the experiment.
There are two kinds of physical records: the steering blocks start with 8 words of control information; the fast blocks have no control information at all.
Several fast blocks in succession are called a burst; each burst of fast blocks is preceded by a steering block, whose control information indicates the number of fast blocks to be expected.
The format of a steering block is as follows:
L+0 word 1: hex 0123CDEF +1 word 2: 80708070 +2 word 3: 4321ABCD +3 word 4: 80618061 +4 word 5: bits 1 -> 24: NWPHR, the physical record length (in 32-bit words) bits 25 -> 32: flag bits: 32 emergency stop block 31 end-of-run 30 start-of-run in this block +5 word 6: physical record counter (fast blocks do not count) to permit checking for blocks lost by read errors; if zero: no checking +6 word 7: NWTOLR, the off-set to the first logical record starting in this block: unless NWTOLR=0, the first new LR in this block starts at word NWTOLR+1, this word being its record size. if NWTOLR = 0: the whole block continues data of the current logical record. +7 word 8: NFAST, the number of fast blocks to follow just behind the current steering block +8 words 9 -> NWPHR: the data body of the block
The decimal values of the steering block stamp, either as 16-bit half-words or as 32-bit words, unsigned or signed, are:
0123CDEF = ( 291 | 52719) = 19 123 695 80708070 = (32880 | 32880) = 2 154 856 560 or -2 140 110 736 4321ABCD = (17185 | 43981) = 1 126 280 141 80618061 = (32865 | 32865) = 2 153 873 505 or -2 141 093 791 0123CDEF = 001 1074 6757 octal 80708070 = 200 3410 0160 4321ABCD = 103 1032 5715 80618061 = 200 3030 0141