Managing Universal Printers Using the PRTDEF
Procedure
About Using the PRTDEF Procedure
Printer definitions can be created for an individual or for all SAS users at a site by using
the PRTDEF procedure. The PRTDEF procedure can be used to do many of the same
printer management activities that you can do with the Universal Printing windows. The
PRTDEF procedure can be used in any execution mode, but it is especially useful if you
use SAS in batch mode, where the Universal Printing windows are unavailable.
To define or modify one or more printers with the PRTDEF procedure, you first create a
SAS data set that contains variables that correspond to printer attributes. These four
variables must be specified for every printer destination:
DEST
specifies the printer destination.
DEVICE
specifies the device name.
MODEL
specifies the name of a printer prototype. For a list of printer prototypes, open the
SAS registry to this key: COREPRINTINGPROTOTYPES.
NAME
specifies the name of the printer.
For a list of optional variables, see “Input Data Set: PRTDEF Procedure” in Base SAS
Procedures Guide. The PRTDEF procedure reads the data set and converts the variable
attributes into one or more printer definitions in the SAS registry.
After you create the printer definition data set, you run the PRTDEF procedure to create
the printer.
Only system administrators or others who have Write permission to the Sashelp library
can use the PRTDEF procedure to create printer definitions for all SAS users at a site.
Individuals have Write permission to their Sasuser library and can use the PRTDEF
procedure to create their own printers. However, the printer definition is stored in the
Sasuser library and is lost if the Sasuser library is deleted. Printer definitions that are
created by individuals are available only when the directory where the printer definition
is stored is specified as the Sasuser library. For information about assigning the Sasuser
library, see “SASUSER= System Option” in SAS System Options: Reference.
For more information see, “PRTDEF” in Base SAS Procedures Guide.
Examples of Creating New Printers and Previewers Using the
PRTDEF Procedure
Introduction
These examples show you how to use the PRTDEF procedure to define new printers and
to manage your installed printers and previewers.
After a program statement containing the PRTDEF procedure runs successfully, the
printers or previewers that have been defined appear in the Print Setup window. A
276 Chapter 15 • Printing with SAS