[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 17:22:23 EDT 2023


On Wednesday, September 20, 2023 at 8:24:48 AM UTC-4, Simon Clubley wrote:
> On 2023-09-20, Dave Froble <da... at tsoft-inc.com> wrote: 
> > 
> > Is it just me, or, was my Basic example shorter and easier to read than your 
> > Cobol, Fortran, and C examples? 
> >
> Arne could always add a Macro-32 example to that list... :-)

We all realize that the OP question has been answered and that RMS Relative files are really a moot point in the whole discussion right?

That said... Macro anyone? See below.

Hein.

        .psect  data, wrt, noexe
buf:    .blkb   32*1024
fao_d:  .ascid "This is line #!4ZL!!"
out_s:  .long   0
out_d:  .long   512
        .address buf
outfab: $FAB fnm=rel.dat, org=rel, fac=put, bks=32, mrs=512, rfm=var, rat=cr
outrab: $RAB fab=outfab, rbf=buf, rsz=500

        .psect  code, nowrt, exe
        .entry  start,0
        $create fab=outfab
        $connect rab=outrab
        blbc    r0, end
        clrl    r10
loop:   incl    r10
        cmpl    r10, #100
        bgtr    end
        movl    #512, out_d
        pushl   r10
        pushal  out_d
        pushal  out_s
        pushal  fao_d
        calls   #4, g^sys$fao
        blbc    r0, end
        movw    out_s, outrab+rab$w_rsz
        $put    rab=outrab
        blbs    r0, loop
end:
        ret
        .end    start





More information about the Info-vax mailing list