[Info-vax] Example of random access by record number on an RMS fixed record size, relative organization file?

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Wed Sep 20 00:18:40 EDT 2023


On Tuesday, September 19, 2023 at 11:15:21 PM UTC-4, gah4 wrote:
> On Tuesday, September 19, 2023 at 5:46:29 PM UTC-7, Arne Vajhøj wrote: 
> 
> (snip)
> > open(unit=1,file='rel.dat',status='new'
,form='formatted', 
> > + organization='relative',recl=512,recordtype='variable', 
> > + access='direct')
> OP asked about fixed record size, and traditionally that is 
> the way it was done. I haven't followed that detail of later 
> Fortran standards. They have to, at least, allocate to the 
> maximum size.

Yes indeed traditionally folks only had half a clue about RMS and vaguely know 512 was a special value and very popular.

With that they proceeded to  maximize their storage losses.

The one flag byte overhead relative file records have (plus two for variable) makes the cells larger than 512
By default  FORTRANT/RMS will now use the default 2 block bucketsize 
Thus wasting 511 (509) bytes per 512 byte record.

Running Arne's sample code:

$ sear/log rel.dat blah
%SEARCH-S-NOMATCH, DSA3:[DECUSERVE_USER.HEIN]REL.DAT;1 - 100 records
$ dire/full rel.dat
:
File organization:  Relative, maximum record number: 2147483647
File attributes:    Allocation: 201, Extend: 0, Bucket size: 2, Global buffer count: 0, No version limit
Record format:      Variable length, maximum 512 bytes, longest 0 bytes
:
Total of 1 file, 201/201 blocks.
$

Grins,
Hein.





More information about the Info-vax mailing list