The SETPU statement sets the characteristics of a print unit.
Format
SETPU key, unit, value
where
key | identifies the parameter to retrieved. This may be: |
1
|
PU$MODE
|
Print unit mode
|
2
|
PU$WIDTH
|
Characters per line
|
3
|
PU$LENGTH
|
Lines per page
|
4
|
PU$TOPMARGIN
|
Top margin size
|
5
|
PU$BOTMARGIN
|
Bottom margin size
|
6
|
PU$LEFTMARGIN
|
Left margin size
|
7
|
PU$SPOOLFLAGS
|
Various print unit flags
|
9
|
PU$FORM
|
Form name (not used by all spoolers)
|
10
|
PU$BANNER
|
Banner page text
|
11
|
PU$LOCATION
|
Printer / file name
|
12
|
PU$COPIES
|
Number of copies to print
|
15
|
PU$PAGENUMBER
|
Current page number (see below)
|
1002
|
PU$LINESLEFT
|
Lines left on page
|
1003
|
PU$HEADERLINES
|
Lines occupied by header
|
1004
|
PU$FOOTERLINES
|
Lines occupied by footer
|
1005
|
PU$DATALINES
|
Lines between header and footer
|
1006
|
PU$OPTIONS
|
Options to be passed to the spooler
|
1007
|
PU$PREFIX
|
Pathname of file holding prefix data to be added to the start of the output
|
1008
|
PU$SPOOLER
|
Spooler to be used (ignored on Windows)
|
1009
|
PU$OVERLAY
|
Catalogued overlay subroutine name (see SETPTR)
|
1010
|
PU$CPI
|
Characters per inch (may be non-integer value)
|
1011
|
PU$PAPER.SIZE
|
Paper size. See SYSCOM PCL.H
|
1012
|
PU$LPI
|
Lines per inch. Must be 1, 2, 3, 4, 6, 8, 12, 16, 24, 48
|
1013
|
PU$WEIGHT
|
Font stroke weight. See SYSCOM PCL.H
|
1014
|
PU$SYMBOL.SET
|
Symbol set. See SYSCOM PCL.H
|
1015
|
PU$STYLE
|
Query processor style. See the Query processor STYLE option for details.
|
2000
|
PU$LINENO
|
Current line number
|
unit | evaluates to the print unit number. |
value | is the value to set for the given parameter. |
The SETPU statement sets the print unit characteristic specified by key to the given value. It is closely related to the SETPU() subroutine.
If successful, STATUS() is set to zero. Otherwise, STATUS() returns an error code.
Mode 15 (PU$PAGENUMBER) can be used to set the current page number before any output to the print unit if a report is to start at a page number other than one. Using this mode after output has commenced may have indeterminate effects.
Example
SETPU PU$LOCATION, 3, "LASER"
The above statement sets the destination for print unit 3 to be the LASER printer.
|