Next: 6.4 ACCW: add to
Up: 6 Input/Output routines
Previous: 6.2 LESW: read data
6.3 RESERV: allocate new file record
subroutine reserv(len,ifil,name,irec)
Reserve len
words of space for a record name
on file ifil
.
If the record already exists, irec
controls the
placement of the new data.

- The existing record is marked as redundant by having its name in
the directory changed to

name
,
and the new record is written at end of the file.

- The existing record is overwritten.

- An extension record is made.
Although in principle explicit calls to reserv are not necessary,
since reserv is called by
sreibw
where
required, it is good practice to use it wherever possible.
In particular, in the parallel environment, where
file records are simulated by global arrays,
it is important to use reserv to instruct the I/O software about
the size of global arrays to use and thereby avoid excessive
fragmentation or overallocation.
P.J. Knowles and H.-J. Werner
molpro-support@tc.bham.ac.uk
Jan 10, 2000