SETPU

SETPU

Top  Previous  Next

 

The SETPU statement sets the characteristics of a print unit.

 

 

Format

 

SETPU key, unit, value

 

where

 

keyidentifies the parameter to set. 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)

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.

1016

PU$NEWLINE

Newline string for this print unit. Must be char(10), char(13) or char(13):char(10)

1017

PU$PRINTER.NAME

Name of printer

1018

PU$FILE.NAME

File name for output directed to a file

1021

PU$FORM.FEED

Set form feed code for this print unit. Must be char(12) or char(13):char(12)

1022

PU$ENCODING

Set character encoding for this print unit

1025

PU$FONT.SIZE

Set the GDI mode font size. Zero uses the default font.

2000

PU$LINENO

Current line number

 

unitevaluates to the print unit number.

 

valueis 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.

 

 

See also:

GETPU()