(* 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 isq(input,output);

type
  datarec  = record
                id : [key(0)] integer;
                data1 : integer;
                data2 : varying [32] of char;
             end;

var
   isqf : file of datarec;
   
begin
   open(isqf, 'p.isq', new, organization := indexed, access_method := keyed);
   isqf^.id := 1;
   isqf^.data1 := 123;
   isqf^.data2 := 'A';
   put(isqf);
   isqf^.id := 2;
   isqf^.data1 := 456;
   isqf^.data2 := 'BB';
   put(isqf);
   isqf^.id := 3;
   isqf^.data1 := 789;
   isqf^.data2 := 'CCC';
   put(isqf);
   close(isqf);
end.
