This example selects two pages from a PRINTJOB. The program prints 500 lines of output and prints the page and line number on each line as in the example for _plineno. Here, the ending page number is set to 2 so that only pages 1 and 2 print:

_pageno=1
_pbpage=1 // reset the default pbpage
_pepage=2 // end on page 2
set printer on
printjob
for i=1 TO 500
  ?? "Page",_pageno," Line",_plineno
  ? // now force a linefeed
endfor
endprintjob
set printer off
close printer // begin printing

The ? command issues a linefeed before processing consequently in this case, the correct line number is obtained by using ??.