next up previous contents index
Next: Outline of usage Up: User specifications for Previous: Representation of a

Events, Runs, and Files

 

The unit of information on a ZEBRA file is the data-structure.

Several data-structures may be (but need not) be grouped into an event. On the file events are separated by the 'start-of-event' flag being present in the first data-structure of each event. FZIN may be asked to skip forward to and read the next 'start-of-event' data-structure.

Several events (or d/s) may (but need not) be grouped into a run. On the file the start and the end of a run are marked by special StoR and EoR records written by calling FZRUN. FZIN may be asked to skip forward to and read the next 'start-of-run' record. (Skipping forward to next run or event should not be used for the medium Memory or Channel.)

A ZEBRA file has to be terminated. The writing of End-of-File is a perennial problem, as the requirements for different kinds of files are different for different machines and different media. Thus for example, on the IBM system MVS one should not terminate a disk file by an ENDFILE statement, as this inhibits the release of the unused space on the disk. A tape, on the other hand, should be terminated by a double EoF which may or may not be provided by the system, yet on the VAX the program will collapse if one tries to ENDFILE an unlabelled tape.

In principle, a Zebra file may logically consist of several files on the same medium. To implement this rigorously on all machines the special Zebra EoF record is provided (an end-of-run record which immediately follows a true end-of-run is also interpreted as EoF). It is written by a call to FZENDO with one of the options T, N, C, or I.

Whether or not the writing of a Zebra EoF signal is followed by the explicit request to write one or two system file-marks (for end-of-file or end-of-data) depends on the circumstances. Most machines do not support multi-file disk files, and some machines do not even support multi-file tape files.

In first approximation, a Zebra file is assumed not to contain imbedded system file-marks. For output this means that no file-marks are written explicitly, leaving the file termination to the system; for input it means that a system file-mark is interpreted as 'end-of-data'. A different behaviour can be selected when calling FZFILE by setting the NEOF parameter associated with the file to 1, 2, or 3 as explained in section gif.



next up previous contents index
Next: Outline of usage Up: User specifications for Previous: Representation of a


Janne Saarela
Mon May 15 08:34:47 METDST 1995