Syntax: SETPTR channel,width,length,top,bottom,mode,options
UniVerse uses numbered 'printer channels' to route information to printers. When you use an LPTR
keyword to send your enquiry to a printer (see Listing Records) or a CP
command to print a single record (see Record Commands), your output goes to the default channel: channel 0. Some commands and keywords, though (like LPTR
) can be followed by a channel number, allowing you to print to any printer attached to a channel.
To link a printer to a channel, use the SETPTR
command. In turn, the parameters are:
channel
: a channel number between 0 and 255. 0 is the default channel.
width
: the width of the paper on the printer (in characters)
length
: the length of the paper on the printer (in lines)
top,bottom
: the margins to allow at the top and bottom of the page (in lines)
mode
: 1=output to printer, 3=output to record in &HOLD&
file, (2=output to 'assigned device', see UniVerse documentation)
options
: most important being AT unixprinterdevice
(in mode 1) and AS filename
(in mode 3), others can be found in the UniVerse documentation.
An example may help. The command...
SETPTR 0,80,66,3,2,1,AT laser001
...sets the default print channel to route output to the unix printer device laser001
, formatted for pages of 66 lines of 80 characters each, and leaving 3 lines at the top and 2 at the bottom blank.
To 'print to disk' try something like:
SETPTR 0,80,66,3,2,3,AS MYOUTPUT
This formats the output the same way, but directs it into a record called MYOUTPUT
in &HOLD&
instead of to the printer.
Syntax: SPOOL -LIST or SPOOL -CANCEL jobnumber
To see the jobs currently waiting in the spool queue, enter the command SPOOL -LIST
. To remove one from the queue, use SPOOL -LIST
to find its job number, and then enter SPOOL -CANCEL jobnumber
.