This is preliminary documentation for Release 8.0 preproduction features. For the most current documentation, see the Universal Printing Web page.
You can print the contents of an active SAS window in two ways:
The following topics discuss Universal printing. Universal printing is available on every host except PCs. For more information on forms printing, seePrinting with Forms.
To print the contents of an active SAS window:
A default printer is required for Universal printing. SAS uses a predefined default printer which will generate output in PostScript Level 1 language with a 12 point courier font to a file called sasprt.ps in the current directory.
To changed the default printer, you can set up a new printer definition and set that printer definition as the default. Multiple printer definitions can be set. Printer definitions can also be set up interactively or by using PROC PRTDEF.
Setting a New Printer Definition
Note: You can also set new printer definitions with PROC PRTDEF.
Using the Define a New Printer Wizard
This wizard includes four window that step you through the process of creating a new printer definition.
On the first window, enter a descriptive name for the new printer. You may enter up to 256 characters. Select Next to move to the next wizard window.
On the second window, select the printer that most closely matches (or actually matches) the printer that you want to use. Select Previous to move to the prior window or Next to move to the next wizard window.
On the third window, set the Device Type, Destination, and Host Options fields. Device Type refers to the type of device to which your output will be routed, such as a printer or a disk. Destination refers to the target location used by the device. Host Options include any host-specific options that you can or want to set for the selected device type.
See also:Populating the Destination List
Select Previous to move to the prior window or Next to move to the next wizard window.
On the fourth window, select Finish to complete the wizard. Note: Your new printer definition becomes the default printer definition that is used when you print the contents of an active window using Universal printing. To change the default printer, see Setting the Default Printer.
The PRINTERPATH option also allows the user to temporarily set the default printer. PRINTERPATH is primarily used in batch, when there is no DMS environment to set the default printer using the dialogs. This option accepts a character string as its value, for example:
options printerpath="myprinter"; options printerpath="Print PostScript to disk";
Valid character strings are from the list of defined printers for the user and saved in the registry.
Testing Printer Properties
Note: Options not supported by your default printer are grayed out and unavailable.
Note: You can also set page setup by issuing DMPAGESETUP to access the window…
When you print the contents of an active window, all pages are printed by default. You can control the page ranges that print, if needed.
Print Preview is not currently available.
You can customize the values of the Printer Properties window’s Destination and Host Options fields. These values are populated from the registry, which can be seeded with a batch job.
To invoke the batch job to seed these fields, run PROC REGISTRY. For example, with the following sample job called routeinfo.sasxreg, you would run:
proc registry import='/u/location/of/routeinfo.sasxreg'; run;
The following job would seed the Destination field with "prn.ps" and "prn.pcl" and the Host Options field with "mod" when "Disk" is selected in the device box. If "email" is selected in the Device field, the Destination field will contain "josmit", "suwong", "mijone", and "anchav", and so on.
#---------------------------------------------------------------------# # Copyright (c) 1999 by SAS Institute Inc, Cary NC 27513 USA # # # # NAME: routeinfo.sasxreg # # TYPE: SAS Route Output to: Destination population # #---------------------------------------------------------------------# [CORE\PRINTING\DESTINATIONS\Disk] "PostScript" = "prn.ps" "PCL" = "prn.pcl" [CORE\PRINTING\DESTINATIONS\DISK\OPTIONS] "Append" = "mod" "Replace" = "" [CORE\PRINTING\DESTINATIONS\EMAIL] "Joe Smith" = "josmit" "Susan Wong" = "suwong" "Mike Jones" = "mijone" "Ann Chavez" = "anchav" [CORE\PRINTING\DESTINATIONS\CATALOG] "My SAS Catalog Entry" = "mine" "Your SAS Catalog Entry" = "yours" [CORE\PRINTING\DESTINATIONS\FTP] "File Transfer Location" = "vivace" "Another Location" = "puck" [CORE\PRINTING\DESTINATIONS\PIPE] "HP LaserJet 5si" = "nlp -dchpljr23" "Tektronix 340" = "nlp -dctpxr21" [CORE\PRINTING\DESTINATIONS\PLOTTER] "HP7550" = "hp7550.hpgl" [CORE\PRINTING\DESTINATIONS\PRINTER] "HP DeskJet 720C" = "LPT1" [CORE\PRINTING\DESTINATIONS\PRINTER\OPTIONS] "A" = "SYSOUT=A" "G" = "SYSOUT=G" [CORE\PRINTING\DESTINATIONS\SOCKET}sprocket] "Bogus Socket 1" = "sprocket1" "Bogus Socket 2" = "sprocket2" [CORE\PRINTING\DESTINATIONS\TAPE] "Drive 100" = "100" "Drive 101" = "101"
Printer definitions can be created in batch mode for an individual or for all SAS users at your site using PROC PRTDEF. The system administrator can create printer definitions in the registry and make these printers available to all SAS users at your site by using PROC PRTDEF with the LIBRARY=SASHELP option. The complete syntax of PROC PRTDEF is as follows:
PROC PRTDEF [options(s)];
where options are:
Specifies the input dataset containing the printer definition records. Printer definitions data records are required to have 5 columns of data which represent the printer name, prototype, device, destination, and host options.
The name will be associated with the rest of the attributes specified with its printer definition data record. The name is limited to 256 characters and is case sensitive. If a record contains a name that already exists, the record will not be processed.
For a valid list of prototypes or model descriptions look in the SAS Registry Editor, which can be invoked with regedit, under CORE, PRINTING, PROTOTYPES or bring up the DMPRTSETUP dialog and press the New... button and view the list in Step 2 of the Printer Definition wizard. The prototype is case sensitive.
Valid devices are listed in step 3 of the Printer Definition wizard and in the SAS Registry Editor under CORE, PRINTING, DEVICE TYPES. The device column is not case sensitive.
The destination is limited to 256 characters.
The host options column is not case sensitive. The host options are limited to 256 characters.
LIBRARY = [SASHELP | SASUSER]
Specifies whether the printer definitions are available to all users or just the user running PROC PRTDEF. The SASHELP library will make the definitions available to all users. You must have permission to write to the SASHELP catalog for LIBRARY=SASHELP to work.
data printers; input name $ 1-22 model $ 23-43 device $ 44-50 dest $ 51-62 hostopt $ 65-70; cards; MyPrinter PostScript Level 1 DISK sasprt.ps mod Joe's Printer PCL 5 Printer DISK sasprt.pcl mod Howard's Printer PostScript Level 2 DISK sasprt2.ps replace ; proc prtdef data=printers library=sashelp; run;
The printers that have been defined will be displayed in the Printer Setup dialog. All PROC PRTDEF defined printers will be displayed in the Printer name list. The printer definitions can also be seen in the regedit window under CORE, PRINTING, PRINTERS. EF="#Adding New Prototypes"Adding New Prototypes
Note: If the end user modifies and saves new attributes on an adiministrator defined printer, the printer will become a user defined printer with any values specified by the user overriding those set by the administrator. If the user defined printer definition is removed, the administator defined printer will reappear.