(* Collection of code snippets by Arne Vajhøj *)
(* (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 relrddir(input,output);

type
   string = varying [255] of char;

var
   i : integer;
   buf : string;
   f : file of string;

begin
   open(f, 'rel.dat', old,
        organization := relative, record_length := 512, record_type := variable,
        access_method := direct);
   reset(f);
   for i := 1 to 100 do begin
      find(f, i);
      buf := f^;
      writeln('|' + buf + '|');
   end;
   close(f);
end.
