[Info-vax] Example of random access by record number on an RMS fixed record size, relative organization file?
gah4
gah4 at u.washington.edu
Sun Sep 17 07:32:39 EDT 2023
On Sunday, September 17, 2023 at 3:43:34 AM UTC-7, Bob Gezelter wrote:
(snip)
> I do not have a sample easily at hand, but the examples in the FORTRAN
> manual should be illuminating.
> I have used relative files in the past, and there was no particular problem.
I used to do them in IBM Fortran, and also PDP-10 Fortran, as unformatted.
For IBM and VAX, there is DEFINE FILE to set the record size, and
WRITE(unit'record) iolist
READ(unit'record) iolist
(That is an apostrophe to indicate the record number.)
It goes:
DEFINE FILE unit(numrec, recsize, U, assov)
Where for VAX/VMS recsize is in 16 bit words.
(I believe for IBM it is 32 bit words.)
The first time it is used, the whole file is formatted into the appropriate
number and size of records.
For IBM OS/360 and descendants, it formats the disk with the specified block size.
(And normally it has a JCL DD statement also specifying the record size and
(the same) block size.)
I don't know RMS enough to know, but it should do something similar, except that
it doesn't format the physical blocks to that size.
As well as I remember the PDP-10, it has to be in whole disk blocks.
More information about the Info-vax
mailing list