Printing with SAS |
Overview of the Universal Printing Menu |
Most SAS Universal Printing windows are accessible from the File menu.
The following display shows the File menu containing the Universal Printing choices of Page Setup, Print Setup, Print Preview, and Print.
File Menu Displaying Universal Printing Options
Menu Choice | Equivalent Command |
---|---|
Page Setup | DMPAGESETUP |
Print Setup | DMPRINTSETUP |
Print Preview | DMPRTPREVIEW |
DMPRINT |
Operating Environment Information: In the Windows operating environment, SAS uses the Windows print windows as the default. To access the Universal Printing user interface, the UPRINTMENUSWITCH system option must also be set along with the UNIVERSALPRINT system option to configure all menus in SAS to use the Universal Printing windows. To do this, include
-uprint -uprintmenuswitch
in the string that you use to invoke SAS in Windows.
You can open all Universal Printing windows by entering commands at the command line or into the command box in the menu bar. The following table lists the commands that you use to do the most common tasks.
Action | Command |
---|---|
Print the current window | DMPRINT |
Change the default printer | DMPRINT, or DMPRINTSETUP |
Create a new printer or previewer definition | DMPRTCREATE PRINTER, or DMPRTCREATE PREVIEWER |
Modify, add, remove, or test printer definitions | DMPRINTSETUP |
Show default printer properties sheet | DMPRINTPROPS |
Show page properties sheet | DMPAGESETUP |
Print preview the current window | DMPRTPREVIEW |
Setting Up Printers |
The File Print Setup menu selection opens the Print Setup window, where you can perform the following tasks:
Change the default printer.
Remove a printer from the selection list.
Print a test page.
Open the Printer Properties window.
Launch the New Printer wizard.
Alternatively, you can issue the DMPRINTSETUP command.
To change the default printer device for this SAS session and future SAS sessions, follow these steps:
Select File Print Setup. The Print Setup window appears.
Select the new default device from the list of printers in the Printer field.
Click OK.
Alternatively, you can issue the DMPRINTSETUP command.
To remove a printer from the selection list:
Select File Print Setup. The Print Setup window appears.
Select the printer you want to delete from the list of printers in the Printer field
Click Remove.
Note: Only your system administrator can remove printers that the administrator has defined for your site. If you select a printer that was defined by your system administrator, the Remove button will be unavailable.
Alternatively, you can issue the DMPRINTSETUP command.
While Universal Printing provides you with predefined printers, you can also add your own printers with the Define a New Printer wizard, which guides you step-by-step through the process of installing a printer.
To start the New Printer wizard and define a new printer, follow these steps:
Select File Print Setup and click New. The following window appears.
Printer Definition Window to Enter Name and Description
Alternatively, you can either issue the DMPRTCREATE PRINTER command or issue the DMPRINTSETUP command and click New.
Enter the name and a description for the new printer (127 character maximum, no backslashes).
Click Next to proceed to Step 2 of the wizard. Select a printer model. If your exact printer model is not available, select a general model that is compatible with your printer. For example, for the HP LaserJet printer series, select PCL5.
Note: General models might provide fewer options than specific models.
Printer Definition Window to Select Printer Model
Click Next to proceed to Step 3 of the wizard. The following window appears:
Select the Device type for your print output. The device type selections are host-dependent.
If you select Catalog, Disk, Ftp, Socket, or Pipe as the device type, then you must specify a destination.
If you select a device type of Printer, then a destination might not be required, because some operating environments use the Host options box to route output.
Note: Examples for your operating system of Device Type, Destination, and Host options are also provided in Sample Values for the Device Type, Destination, and Host Options Fields.
Enter the Destination for your file. The destination is the target location for your device type. For example, if your device type is disk, then your destination is an operating environment-specific filename. With some system device types, the destination might be blank and you can specify the target location using the Host options box.
Select or enter any host-specific options for the device that you chose. This field might be optional for your operating environment. For a list of host options, refer to the FILENAME statement information for your operating environment.
Note: The Destination and Host Options lists can also be populated using the REGISTRY procedure. Click the Help button in step 3 to refer to the "Populating Destination and Host Option Lists" topic, which contains more details.
Click Next to proceed to Step 4 of the wizard, in which you select from a list of installed print previewers. If no previewers are defined, proceed to the next step of the wizard.
Printer Definition Window to Select Previewer
If the previewer selection box appears, select the previewer for this printer. If you do not need a previewer, choose None or leave the field blank.
Note: You can add a previewer to any printer through the DMPRTCREATE PREVIEWER command. For more information, see Define a New Previewer.
Note: It is not required that printers and print previewers share a common language.
Click Next to proceed to Step 5 of the wizard. The following window appears:
Printer Definition Window to Complete Process
Click Previous to change any information. Click Finish when you have completed your printer definition.
You have now finished setting your default printer.
After you have returned to the Print Setup window, you can test your default printer by clicking Print Test Page.
Printer properties that you can change include the following:
the printer name and description
the printer destination device and its properties
the default font for the printer
advanced features such as translation tables, printer resolution, and the print previewer associated with the printer
To change printer properties for your default printer, follow these steps:
Select File Print Setup and choose Properties. The Printer Properties window appears.
Alternatively, you can issue the DMPRTPROPS command.
From the Printer Properties window, select the tab that contains the information that you need to modify.
In the Name tab, you can modify the printer name and the printer description.
Printer Properties Window Displaying Name Tab
The Destination tab enables you to designate the device type, destination, and host options for the printer. See Sample Values for the Device Type, Destination, and Host Options Fields for examples.
The Font tab controls the available font options. The selections available in the drop-down boxes are printer specific. The font size is in points.
Note: This window enables you to set attributes for the default fonts. Typically, procedure output is controlled by the fonts specified by the ODS style or by program statements that specify font attributes.
Printer Properties Window Displaying Font Tab
The Advanced tab lists the Resolution, Protocol, Translate table, Buffer size, Previewer, and Preview command options for the printer. The information in the drop-down fields is printer specific.
Printer Properties Window Displaying Advanced Tab
specifies the resolution for the printed output in dots per inch (dpi).
provides the mechanism for converting the output to a format that can be processed by a protocol converter that connects the EBCDIC host mainframe to an ASCII device. Protocol is required in the z/OS operating environment, and if you must use one, select one of the protocol converters that are listed.
manages the transfer of data between an EBCDIC host and an ASCII device. Normally, the driver selects the correct table for your locale; the translate table needs to be specified only when you require nonstandard translation.
controls the size of the output buffer or record length. If the buffer size is left blank, a default size will be used.
specifies the Previewer definition to use when Print Preview is requested. The Previewer box contains the previewer application that you have defined. See Define a New Previewer.
is the command that will be used to open an external printer language viewer. For example, if you want Ghostview as your previewer, type ghostview %s . When a Preview Command is entered into a Printer definition, the printer definition becomes a previewer definition. The Preview Command must a valid command. When the command is executed as part of the preview process the %s will be replaced with the name of a temporary file that contains the input for the preview command.
Note: The Previewer and Preview Command fields are mutually exclusive. When you enter a command path into the Preview Command field, the Previewer box will appear dimmed.
The PRINTERPATH= system option enables you to specify a Universal Printer to use for the current SAS session. This printer specification is not retained across SAS sessions. The PRINTERPATH= system option is primarily used in batch mode, when there is no windowing environment in which to set the default printer. This option accepts a character string as its value--for example:
options printerpath=myprinter; options printerpath="Print PostScript to disk";
Note: If the printer name contains blanks, you must enclose it in quotation marks.
You can get a list of valid character strings from two places:
the list of printers in the Printer field of the Print Setup window.
the list of defined printers in the registry under SAS_REGISTRY\\CORE\\PRINTING\\PRINTERS.
You can also override the printer destination by specifying a fileref with the PRINTERPATH= system option:
options printerpath= (myprinter printout); filename printout ...;
Printing with Universal Printing |
To print a test page, follow these steps:
Select File Print Setup and choose Print Test Page to open the Print Setup window.
Select the printer for which you would like a test page from Printer listview.
Click Print Test Page.
Alternatively, you can issue the DMPRINTSETUP command.
To print the contents of a window in SAS, follow these steps:
Click inside the window to make it active.
Select File Print. A print window appears. Your print window might differ from the window that follows.
Alternatively, you can issue the DMPRINT command.
Print Window
If the Use Forms check box is visible, clear it in order to use Universal Printing.
From the Printer group box, select the name of the printer definition.
Enter the number of copies that you want.
If you want to save your print job to a file,
Select Print to File.
Select OK. The File Selection window appears.
Select an existing file or enter a new filename.
Note: If you print to an existing file, the contents of the file are either overwritten or appended, depending on whether you choose replace or append from the print window that is open. Most viewers for GIF, PDF, SVG, and PNG will not view appended files. When append is selected, a merged PDF is not produced.
Set additional printing options.
The fields in the Page Options area provide choices according to the content in the SAS window that you are trying to print. By default, SAS prints the entire contents of the selected window.
Item to Print | Do This |
---|---|
Selected lines of text in a window
Note: not available on z/OS |
Select the text that you want to print, and then open the Print window. In the Page Options box, check the Print Selected Text box. |
The page that is currently displayed in the window | Select Current page. |
A range of pages or other individual pages |
Select Range and enter the page numbers in
the Pages field. Separate individual page numbers
and page ranges with either a comma (,) or a blank. You can enter page ranges
in any of these formats:
|
In color | Check the Print Color box. |
Line numbers | Check the Print Line Numbers box. |
Page numbers | Check the Print Page Numbers box. |
A graph | Use the DMPRINT command, or select File Print. Verify that the Use SAS/GRAPH Drivers check box is deselected in order to use Universal Printing. |
Click OK to print.
Working with Previewers |
Previewers enable you to preview a print job. SAS does not set a default previewer application. To use the Print Preview feature in SAS, you or your system administrator must first define a previewer for your system.
Operating Environment Information: Print Previewers are not supported on z/OS.
Previewers can be defined using the New Previewer wizard. To use the New Previewer wizard to define a new print previewer, follow these steps:Issue the DMPRTCREATE PREVIEWER command. The following window appears:
Previewer Definition Window to Enter Name and Description
Enter the name and a description for the new previewer (127 character maximum, no backslashes).
Click Next to proceed to Step 2 of the wizard.
Previewer Definition Window to Enter Previewer Language
Select the printer model that you want to associate with your previewer definition. The PostScript, PCL or PDF language generated for the model must be a language that your external viewer package supports. For best results, select the generic models such as PostScript Level 1 (Color) or PCL 5.
Click Next to proceed to Step 3 of the wizard.
Previewer Definition Window to Enter Command to Open Previewer Application
Enter the command or commands used to open the previewer application, followed by %s where you would normally put the input filename. For example, if the command for starting your previewer is "ghostview," then you would type ghostview %s in the text field.
You can pre-populate or seed a list of commands used to invoke a print preview application. For more information, see Seeding the Print Previewer Command Box.
Note: The %s can be used as many times as needed in the commands for starting the viewer. However, the start command needs to be the fully qualified command if it is not in the machine's command path.
Click Next to proceed to Step 4 of the wizard.
Previewer Definition Window to Complete Process
Click Previous to correct any information. Click Finish when you have finished defining your default previewer.
The newly defined previewer will display a previewer icon in the Print Setup window.
Print Setup Window Displaying New Previewer
This previewer application can be tested with the Print Test Page button on the Print Setup window.
Print Preview is supported by print previewer applications such as Ghostview, gv, and Adobe Reader. The Preview command box that appears in the Previewer Definition wizard (Previewer Definition Window to Enter Command to Open Previewer Application) and on the Advanced tab of the Printer Properties window (Printer Properties Window Displaying Advanced Tab) can be prepopulated or seeded with a list of commands. These commands are used to invoke print previewer applications that are available at your site. Users and administrators can manually update the registry, or define and import a registry file that contains a list of previewer commands. This is an example of a registry file.
[CORE\PRINTING\PREVIEW COMMANDS] "1"="/usr/local/gv %s" "2"="/usr/local/ghostview %s"
You can use the print preview feature if a print viewer is installed for the designated printer. Print Preview is always available from the File menu in SAS. You can also issue the DMPRTPREVIEW command.
Set Page Properties |
For your current SAS session, you can customize how your printed output appears in the Page Setup window. Depending on which printer you have currently set, some of the Page Setup options that are described in the following steps might be unavailable.
To customize your printed output, follow these steps:
Select File Page Setup. The Page Setup window appears.
Alternatively, you can issue the DMPAGESETUP command.
Select a tab to open windows that control various aspects of your printed output. Descriptions of the tabbed windows follow.
The Page Setup window consists of four tabs: General, Orientation, Margins, and Paper.
The General tab enables you to change the options for Binding, Collate, Duplex, and Color Printing.
Page Setup Window Displaying General Tab
specifies the binding edge (Long Edge or Short Edge) to use with duplexed output. This sets the Binding option.
specifies whether the printed output should be collated. This sets the Collate option.
specifies whether the printed output should be single-sided or double-sided. This sets the Duplex option.
specifies whether output should be printed in color. This sets the Colorprinting option.
The Orientation tab enables you to change the output's orientation on the page. The default is Portrait. This tab sets the ORIENTATION option.
Page Setup Window Displaying Orientation Tab
The Margin tab enables you to change the top, bottom, left and right margins for your pages. The value range depends upon the type of printer that you are using. The values that are specified on this tab set the TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN options.
Page Setup Window Displaying Margins Tab
The Paper tab specifies the Size, Type, Source, and Destination of the paper used for the printed output.
Page Setup Window Displaying Paper Tab
specifies the size of paper to use by setting the PAPERSIZE option. Paper sizes include Letter, Legal, A4, and so on.
specifies the type of paper to use. Examples of choices include Standard, Glossy, and Transparency. This sets the PAPERTYPE option.
designates which input paper tray is to be used. This sets the PAPERSOURCE option.
specifies the bin or output paper tray that is to be used for the resulting output. This sets the PAPERDEST option.
Note: Page settings are stored in the SAS registry. Although your page settings should remain in effect from one SAS session to another, changing default printers could lose, change, or disable some of the settings. If you change printers during a SAS session, check the Page Setup window to ensure that all of your settings are valid for your new default printer.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.