Universal Printing |
Setting the Default Printer |
A default printer is required for Universal Printing. Unless you define a default printer, SAS uses a predefined default printer that generates output in PostScript Level 1 language with a 12-point Courier font.
On z/OS, output goes by default to a sequential data set called <prefix>.SASPRT.PS where <prefix> is the value of the SYSPREF= SAS option.
Defining a New Printer Interactively |
To create a new printer definition interactively:
Select New Printer
The first of four Define a New Printer dialog boxes is displayed. Fill out the fields in these dialog boxes to complete your new printer definition. Alternatively, you can issue the command DMPRTCREATE PRINTER to start the Define a New Printer dialog box directly.
Note: The Define a New Printer dialog box does not prompt you for printer detail fields, including the Protocol and Translate Table (TRANTAB) fields. The printer details are automatically initialized to the details in the prototype you select. When the Define a New Printer dialog boxes are complete, you are returned to the Printer Setup window with the new printer highlighted.
Follow these steps if you need to change any of the printer detail fields:
Select Properties.
Select Advanced.
Change the values of Protocol and Translate Table as necessary.
Select OK.
For further details about values for Protocol and Translate Table, refer to Setting Up Printers in Your Environment.
Changing the Default Printer |
You can use any of the following procedures to change the default printer:
Use the Print Setup window.
Issue the command DMSETPRINT <'printer-name'> , where <'printer-name'> is the name of the printer that you want to set as the default.
Submit the statement OPTIONS PRINTERPATH=('printer-name' <fileref> ) . See The PRINTERPATH SAS Option for more information about the PRINTERPATH option.
Note: DMPRTSETUP and DMSETPRINT generate an entry in the SASUSER library, and they remain in effect until they are changed. Setting a default printer with the OPTIONS PRINTERPATH= command does not generate an entry in the SASUSER library. It remains in effect for the duration of the session only.
Setting Printer Properties |
Use the following procedure to set the properties for a printer:
From the Printer list box, select a printer.
Select Properties.
In the Printer Properties window, select the Destination tab to set the device type, destination, and host options.
refers to the type of device to which your output is routed, such as a printer or a disk.
refers to the target location used by the device.
includes any host-specific options that you can set for the selected device type.
(Optional) Select Advanced to set resolution, protocol, translate table, buffer size, previewer, and preview command information for the printer.
specifies the resolution to use for printed output in dots per inch.
specifies how to convert the output to a format that can be processed by a protocol converter that connects the mainframe to an ASCII device. Protocol information is applicable only to IBM hosts.
specifies the translate table to use for generating your printed output. A translate table is needed when an EBCDIC host sends data to an ASCII device.
refers to the buffer size to use when sending output to the printer.
refers to the name of the viewer that is used when a print preview occurs. This option is not used in mainframe environments.
specifies a preview command for your previewer. This option is not used in mainframe environments.
(Optional) Select Font to open a window where you can set the default font information for your printer.
Note: Printer properties are stored in the SASUSER library and remain in effect until changed.
For information about the way printer properties are used in the mainframe environment, see Setting Up Printers in Your Environment.
Changing the Default Font |
The font included in the definition of the current default printer is the font used to generate output, unless you override it with the SYSPRINTFONT= system option. SYSPRINTFONT= sets the font to use when printing to the current default printer or to the printer identified with the optional keywords NAMED or ALL. You can specify SYSPRINTFONT= in your configuration file, at SAS invocation, or in an OPTIONS statement.
The syntax is as follows:
SYSPRINTFONT=(face-name <weight> <style> <character-set> <point-size> <NAMED printer-name | DEFAULT | ALL>) |
specifies the name of the font face to use for printing. This value must be a valid font face name. If the face-name consists of more than one word, it must be enclosed in single or double quotation marks. Valid font face names are listed in the Printer Properties window under the Font tab.
specifies the weight of the font, such as bold. A list of valid values for your specified printer appears in the Printer Properties window. The default value is NORMAL.
specifies the style of the font, such as italic. A list of valid values for your specified printer appears in the Printer Properties window. The default is REGULAR.
specifies the point size to use for printing. This value must be an integer. If you omit this argument, SAS uses the default point size.
specifies the character set to use for printing. Valid values are listed in the Printer Properties window, under the Font tab. If the font does not support the specified character set, the default character set is used. If the default character set is not supported by the font, the font's default character set is used.
must match exactly the name shown in the Print Setup window (except that the printer name is not case sensitive). If it is more than one word, the printer-name must be enclosed in double quotation marks.
is the current default printer if you do not specify another printer.
updates the font information for all installed printers.
Setting Page Properties |
From the Page Setup window, make selections that apply to the pages printed for the remainder of your SAS session or until the values are changed again through this window or through specification of options.
The selections that you can make in this window correspond to options that can be set by submitting an OPTIONS statement. These options are listed in the following table:
General Options | Paper | Margins | Other |
---|---|---|---|
BINDING | PAPERDEST | TOPMARGIN | ORIENTATION |
COLLATE | PAPERSIZE | RIGHTMARGIN |
|
DUPLEX | PAPERSOURCE | LEFTMARGIN |
|
COLORPRINTING | PAPERTYPE | BOTTOMMARGIN |
|
Changes made by issuing the above options on an OPTIONS statement remain in effect for the current SAS session only. Changes made through the Page Setup window remain in effect for subsequent SAS sessions.
Options not supported by your default printer are dimmed and are not selectable.
Testing Printer Properties |
Select a printer from the Printer list box.
Select Print Test Page.
Setting a Page Range Value |
When you print the contents of an active window in the SAS windowing environment (such as the Program Editor or Log window), all pages are printed by default. In certain situations, the Print window includes a Page Range group box that you can use to control the page ranges that print.
Select the appropriate SAS window.
If the Page Range group box is available, select either All Pages, Current Page, or Select Range from the Range combo box. If you choose Select Range, then specify the pages that you want to print in the Pages field. You must separate individual pages or page ranges with either a comma or a blank space.
n-m prints all pages from n to m (where n and m are both numbers).
-n prints all pages from page 1 to n.
n- prints all pages from page n to the last page.
Previewing a Print Job |
You cannot preview a print job in the mainframe environment.
Printing Selected Text |
You cannot print selected text in the mainframe environment.
Printing the Contents of a SAS Window |
To print the contents of a SAS window with Universal Printing:
Select the window that you want to print.
If the Use Forms check box is visible, verify that it is not selected.
From the Printer group box, select the appropriate printer name and the number of copies that you want to print.
Note: If you choose to print multiple copies and Collation is turned off, each page prints the given number of times before the next page begins printing.
Select or deselect additional Print window fields, if any additional fields are available.
The fields that appear depend on the content that exists in the SAS window that you are trying to print. For example, if a window is active (such as the Program Editor), then the Page Range group box is available.
Select the page range or specify the pages that you want to print.
See Printing the Contents of a Graphics Window for more information about printing the contents of a graphics window.
Directing the Contents of a SAS Window to a File |
Select the Print to File check box in the Printer group box.
Select OK.
A window opens that enables you to save your contents to a specific filename.
The filename must be fully qualified. Quotation marks are not needed, but you can use them.
If the file does not exist, you are asked if you want to create it, and if you want to delete it or catalog it. The file is created as a variable blocked (RECFM=VB) file.
If the file does exist, you are asked if you want to replace it or append to it.
Note: The protocol and prototype properties of the selected printer definition are used to format the records that are written to the file. Thus, if you select a printer that has a protocol value of ASCII and a prototype value of PostScript Level 1 (Gray Scale), you generate a file that contains PostScript records written with the ASCII character set. To move this file to an ASCII platform, you must execute a Binary (FTP) transfer.
Printing the Contents of a Graphics Window |
Select the graphics window that you want to print.
Select the appropriate printer name and the number of copies that you want to print from the Printer group box.
Note: If you choose to print multiple copies and Collation is turned off, each page prints the given number of times before the next page begins printing.
In the Print Method group box, verify that the Use SAS/GRAPH Drivers check box is not selected.
Creating Printer Definitions When Universal Printing Is Turned Off |
You can create printer definitions with PROC PRTDEF when Universal Printing is turned off, but the printer definitions do not appear in the Print window. When Universal Printing is turned on, the menu options change to offer the Universal Printing options. When Universal Printing is turned off, the Universal Printing options are not available.
If you want to specify your printer definitions when Universal Printing is turned off, do one of the following:
Specify the printer definition as part of the PRINTERPATH SAS System option.
Submit the following statement:
ODS PRINTER SAS PRINTER = myprinter;where myprinter is the name of your printer definition.
Universal Printing and the SAS Registry |
Universal Printing printer definitions are stored in the SAS registry. To access the SAS registry:
Select: Solutions Accessories Registry Editor
or
Issue
the command REGEDIT.
Select: Core Printing Printers
The printer definitions in SASUSER are listed first, followed by the printer definitions in SASHELP, along with all their options. You can modify any of the options for the printer definitions in SASUSER if you have permission to write to the SASUSER library. To modify the options:
Select: Edit Modify
or
Click the right mouse button and select MODIFY.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.