When you create a data set to use
with the PRTDEF procedure to define a printer, you must specify the
name, model, device and, destination variables.
The following code creates
a data set to use with the PRTDEF procedure:
data printers;
input name $15. model $35. device $8. dest $14.;
datalines;
Myprinter PostScript Level 1 (Gray Scale) PRINTER printer1
Laserjet PCL 5 PCL 5e (RunLength) PIPE lp -dprinter5
Color LaserJet PostScript Level 2 (Color, Duplex) PIPE lp -dprinter2
;
run;
proc print data=printers;
run;
After you create the
data set containing the variables, you run the PRTDEF procedure. The
PRTDEF procedure creates the printers that are named in the data set
by creating the appropriate entries in the SAS registry.
proc prtdef data=printers usesashelp replace;
run;
The USESASHELP option
specifies that the printer definitions are to be placed in the Sashelp
library, where they are available to all users. If the USESASHELP
option is not specified, then the printer definitions are placed in
the current Sasuser library, where they are available to the local
user only, and the printers that are defined are available only in
the local Sasuser directory. However, to use the USESASHELP option,
you must have permission to write to the Sashelp library.
The REPLACE option specifies
that the default operation is to modify existing printer definitions.
Any printer name that already exists is modified by using the information
in the printer attributes data set. Any printer name that does not
exist is added.