(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
[inherit('sys$library:pascal$lib_routines')]
program isqadd(input, output);

%include 'isq.pas'

var
   db : t1file;
   form_f1, form_f2 : varying [255] of char;
   f1 : integer;
   f2 : pstr;

begin
   lib$get_symbol('FORM_FLD_F1', form_f1.body, form_f1.length);
   readv(form_f1, f1);
   lib$get_symbol('FORM_FLD_F2', form_f2.body, form_f2.length);
   f2 := form_f2;
   open(db, 'disk5:[cgi.osu]db.isq', old, organization := indexed, access_method := keyed);
   reset(db);
   db^.f1 := f1;
   db^.f2 := f2;
   put(db);
   close(db);
   writeln('Location: http://arne1.vajhoej.dk:81/htbin/isqshow');
   writeln;
end.
