C Collection of code snippets by Arne Vajhøj 
C (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
      program relwrt
      integer*4 i, buflen
      character*80 buf
      open(unit=1,file='rel.dat',status='new',form='formatted',
     +     organization='relative',recl=512,recordtype='variable',
     +     access='direct')
      do 100 i = 1, 100
        write(buf,'(14HThis is line #,i4.4,1H!)') i
        buflen = index(buf,'!')
        write(unit=1,rec=i) buf(1:buflen)
100   continue
      close(unit=1)
      end
