This example prints 100 lines of output and prints a heading on line 1 of each page:

set talk off
set printer on
_pageno=1
for i=1 TO 100
  if _plineno=1 // At first line of page
     ? "Top of Page ",_pageno
  endif
  ? "Line",i
endfor
set printer to
close printer
set talk on