GETPU()

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:

0

PU$DEFINED

Is print unit defined?

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.

1016

PU$NEWLINE

Newline string for this print unit

1017

PU$PRINTER.NAME

Name of printer

1018

PU$FILE.NAME

File name for output directed to a file

1019

PU$SEQNO

Hold file sequence number.  See also @SEQNO.

1020

PU$FORM.QUEUE

Last assigned form queue number with SP.ASSIGN. This value will be meaningless if the characteristics of the print unit have subsequently been modified.

1021

PU$FORM.FEED

Get form feed string for this print unit

1022

PU$ENCODING

Get character encoding for this print unit

1023

PU$FONT

Get font name

1024

PU$PATHNAME

Get pathname of output file

1025

PU$FONT.SIZE

Get the GDI mode font size. Zero implies use of the default font.

2000

PU$LINENO

Current line number on page

 

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.

 

The PU$DEFINED key should be used to determine if a print unit has been defined. Use of any other key value for an undefined print unit will create it with all settings at their default values.

 

 

Example

 

MODE = GETPU(PU$MODE, 3)

 

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

 

 

See also:

SETPU