%begin
   %constinteger max test = 762
   %integer j,from,to
   %string(127) Opt, Comp, Log
   %externalintegerfnspec QI %alias "3L_IMP_QUALIFIER_I"(%string(255) S)
   %externalstring(255)%fnspec QS %alias "3L_IMP_QUALIFIER_S"(%string(255) S)

   %routine CLI(%string(255) S)
      %constinteger Brasil CLI = 5 ! 1<<17
      %integer A
      S = S.Tostring(13)
      A = Addr(Charno(S, 1))
      *LDR _ 0, A
      *SWI _ Brasil Cli
   %end

   Comp = QS("COMPILER");  Comp = "PASCAL" %if Comp = ""
   Log = QS("LOG");        Log  = "LOG"    %if Log = ""
   Opt = QS("OPTION")
   From = QI("FROM")
   To   = QI("TO")
   From = 1 %if From <= 0
   To = Max Test %if To <= 0
   To = Max Test %if To > Max Test
   From = To+1 %if From > To

   open output(1, "all");  select output(1)
   Printstring("Show Sys$Date");  Newline
   Printstring("Show Sys$Time");  Newline
   Printstring(Comp." -Identify");  Newline
   %for J = From, 1, To %cycle
      Printstring("gett #");  Write(J, 0);  Newline
      Printstring(Comp." test ".Opt);  Newline
      Printstring("dolink");  Newline
      Printstring("dotest");  Newline
      %if J = 758 %start
         Printstring("!This is simply a comment");  Newline
      %finish
   %repeat
   Printstring("Show Sys$Date");  Newline
   Printstring("Show Sys$Time");  Newline
   Printstring("spool");  Newline
   Close Output
   Select Output(0)
   Printstring("Log being sent to file ".Log);  Newline
   CLI("create ".log." 50000")
   CLI("spool ".log)
   CLI("exec all")
%end
