Routine ID: IOPA400 | |
---|---|
Author(s): | Submitted: 20.08.87 |
Origin: R.Brun | Revised: 17.12.93 |
I/O with direct access files is the most efficient way to use direct access devices. All the routines described in this section and in ( [IOPA500]) are based on the ZEBRA-RZ package and the user is referred to the related documentation [] for an understanding of the basic principles.
CALL GRFILE (LUN,CHFILE,CHOPT)
This routine opens a file for direct access I/O of ZEBRA data structures. By default the file is opened in exchange mode and the option W is added, which creates an RZ top level directory with the name //LUNnn where nn is the logical unit number.
The default allocation of an RZ directory is enough for 1000 records, which allows for a 4Mb file with the standard record length of 1024 words. If a larger file is needed, the size of the directory should be changed when creating the file. This can be done by assigning to the variable IQUEST(10) in the common /QUEST/ the requested number of records, and calling GRFILE with the option Q as shown in the following example:
COMMON / QUEST / IQUEST(100) . . . IQUEST(10) = 5000 CALL GRFILE(1,'mygeom.geom','Q')
Routine to close an RZ file. It is very important to call this routine for all RZ files open in write mode. Failure to do may result in the files being incompletely written or corrupted.