The print on statement directs output to one of 32,767 open print files.
print on print.file.num print.exp
print.file.num | Specifies the print file (from 0-31,999) to which the input is sent. Up to 32,000 print files can be opened at one time. |
print.exp | Expression whose output is sent to the printer. Multiple expressions can be specified. |
The print file number has no connection to spooler print file numbers. This number is logical and local to the current program and is used to group output.
Each logical print file number is assigned the next available spool job number. Therefore, it is possible to have the statement print on 1 answer output to job #3 and print on 2 string output to job #30.
print on 0 oconv(chk.dt,"d2/") "l#9":amt "r2*20"