next up previous contents index
Next: Tape fileFortran Up: Usage of FZ Previous: Usage of FZ

Exchange file format representation

A true exchange-mode file consists of a stream of fixed-length records without any system control-words; such a file can be shipped between machines using 'ftp' in binary mode.

Unfortunately, the Fortran implementations of several UNIX machines cannot read or write such a file in sequential mode, for this mode they insist on having sytem control-words with every record.

On these machines, such as Apollo, DECstation, HP Unix, Silicon Graphics, Sun, one should use the direct-access mode, or possibly the C-Library mode, selecting the D or the L option with FZFILE.

There is another possibility: if on these machines one creates a Zebra file using sequential Fortran WRITE, one gets a file of fixed-length records, but with system control-words. Such a file one can re-read with sequential READ, of course, and one can ship it to another machine using the CERN utility ZFTP, which can produce the target copy with or without system-control words. This is fine for sequential use of the file; the problem remains that one cannot then read the same file sometimes sequentially, sometimes with direct-access.

The preferred solution for theses machines is to write and read it in direct-access mode for disk files, in C Library mode for tape files.

And generally: use ZFTP rather than FTP, if you have it, to ship files around, particularly if the target machine is VAX.


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