Top  Previous  Next


The SPOOL command sends specified records to the printer.





SPOOL file record(s) { LINES m n } { LNUM }{ LPTR n }




fileis the file holding the record(s) to be printed.


record(s)is a list of records to be printed. If no record ids are specified, SPOOL will use the default select list to identify the records to be printed.


LINES m nspecifies that only line m to n of the record(s) are to be printed. The value of m must be greater than 0 and the value of n must be greater than m.


LNUMspecifies that line numbers are to be printed.


LPTR nspecifies the print unit to be used. If omitted, print unit 0 is used.



The SPOOL command sends the specified records to print unit 0. The actual destination is determined by use of either PRINTER or SETPTR.


Use of the LNUM keyword prefixes each line by its line number, a colon and a single space. The line number is printed as a minimum of four digits but expands if the record has more than 9999 lines.





SPOOL INVOICES 01249 01250


The above command would print records 01249 and 01250 from the INVOICES file. The SPOOL command does no formatting of the data except to replace field marks by newlines.