GETPU()

Top  Previous  Next

 

The GETPU() function gets the characteristics of a print unit.

 

 

Format

 

GETPU(key, unit)

 

where

 

keyidentifies 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

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

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.

 

unitevaluates to the print unit number.

 

 

The GETPU() function returns the print unit characteristic specified by key. It is closely related to the !GETPU() subroutine.

 

 

Example

 

MODE = GETPU(PU$MODE, 3)

 

The above statement gets the mode of print unit 3, storing it in MODE.