If you are speaking of random accessing fixed length records, FTN does a fine job of doing just that. In short, you open the file and indicate it is a fixed length record direct access file whose record size is 'n', issue reads/writes using a specific form of READ and WRITE, then CLOSE the file.
Here's a sample:
OPEN(UNIT=10,FILE='my_direct_file',STATUS='NEW',
$ ACCESS='DIRECT',RECL=125,FORM='UNFORMATTED',
$ IOSTAT=ICHECK,ERR=2220)
write(10,rec=1)i,j,k,l,iarray(1:20)
read(10,rec=1)ii,jj,kk,ll,o_array(1:20)
close(unit=10)
The code opens a file unit (10). This can be a variable or a constant; your choice. The file is named 'my_direct_file', it is 'NEW' (will be created, will cause an error if already existing), it is to be a 'DIRECT' access file (by record numbers) whose record length is 125 bytes and data is 'UNFORMATTED' (meaning format codes are not needed to read or write the data). For error checking, I use IOSTAT as an option (it will contain an error/status code to be placed in the variable ICHECK, and if an error is detected, program control will go to the label 2220 for handling.
I write the first record with the variables as indicated. So long as the length of the data (in bytes) is less than 125, the write is successful. If the write has less than 125 bytes, only those bytes actually written will be defined. Stated another way, the remainder of the record will be undefined.
I can then read this data into different variables.
Then, the unit is closed, buffers are flushed, and life continues.
To access the data, I'll need to open the file again. This time, I'd use a status of 'OLD' because the file should exist. The rest of the OPEN would remain the same.
There are several nuances in the parameters available for an OPEN statement. The documentation is thorough; that said, if you are a novice at this, you can ask for help here is something is not working as you thought it should.
One thing to remember: You cannot write a record to just any record position. You can write the NEXT logical record (as I did) or any PREVIOUSLY written record. You can't initially create a file and write REC=2, for example. Record 1 must first exist!
Hope this helps!