PRTDEF Procedure

Example 3: Creating a Single Printer Definition That Is Available to All Users

Features:
PROC PRTDEF statement options::
DATA=
USESASHELP

Details

This example creates a definition for a Tektronix Phaser 780 printer with a Ghostview print previewer with the following specifications:
  • bottom margin set to 1 inch
  • font size set to 14 point
  • paper size set to A4

Program

data tek780;
   name = "Tek780";
   desc = "Test Lab Phaser 780P";
   model = "Tek Phaser 780 Plus";
   device = "PRINTER";
   dest = "testlab3";
   preview = "Ghostview";
   units = "cm";
   bottom = 2.5;
   fontsize = 14;
   papersiz = "ISO A4";
run;
proc prtdef data=tek780 usesashelp;
run;

Program Description

Create the TEK780 data set and supply appropriate information for the printer destination. The TEK780 data set contains the variables whose values contain the information that is needed to produce the printer definitions. In the example, assignment statements are used to assign these variables. The NAME variable specifies the printer name that is associated with the rest of the attributes in the printer definition data record. The DESC variable specifies the description of the printer. The MODEL variable specifies the printer prototype to use when defining this printer. The DEVICE variable specifies the type of I/O device to use when sending output to the printer. The DEST variable specifies the output destination for the printer. The PREVIEW variable specifies which printer is used for print preview. The UNITS variable specifies whether the margin variables are measured in centimeters or inches. The BOTTOM variable specifies the default bottom margin in the units that are specified by the UNITS variable. The FONTSIZE variable specifies the point size of the default font. The PAPERSIZ variable specifies the default paper size.
data tek780;
   name = "Tek780";
   desc = "Test Lab Phaser 780P";
   model = "Tek Phaser 780 Plus";
   device = "PRINTER";
   dest = "testlab3";
   preview = "Ghostview";
   units = "cm";
   bottom = 2.5;
   fontsize = 14;
   papersiz = "ISO A4";
run;
Create the TEK780 printer definition and make the definition available to all users. The DATA= option specifies TEK780 as the input data set. The USESASHELP option specifies that the printer definition will be available to all users.
proc prtdef data=tek780 usesashelp;
run;