SAS 9.1.3 Language Reference: Concepts, Third Edition, Volumes 1 and 2

Managing Printing Tasks with the Universal Printing User Interface

Overview of the Universal Printing Menu

You can open most 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.

Table 17.3: Commands to Open Universal Printing Windows

To do this

Use this 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

The SAS Universal Printing windows are also 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.

Display 17-1: File Menu Displaying Universal Printing Options

Table 17.4: Menu choices or commands open Universal Printing windows

Menu Choice

Equivalent command

Page Setup

DMPAGESETUP

Print Setup

DMPRINTSETUP

Print Preview

DMPRTPREVIEW

Print

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, UPRINTMENUSWITCH must also be set along with the UNIVERSALPRINT 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.

Setting Up Printers

Print Setup Window

The DMPRTSETUP command opens the Print Setup window, where you can

Changing the Default Printer

To change the default printer device for this SAS session and future SAS sessions,

  1. Issue the DMPRTSETUP command. The Print Setup window appears.

  2. Select the new default device from the list of printers in the Printer field.

  3. Click .

Removing a Printer from the Selection List

To remove a printer from the selection list, follow these steps.

  1. Issue the DMPRTSETUP command. The Print Setup window appears.

  2. Select the printer you want to delete from the list of printers in the Printer field

  3. Click

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 button will be unavailable.

Defining a New Printer

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:

  1. Issue the command DMPRTCREATE PRINTER. The following window appears.

    Display 17-2: Printer Definition Window to Enter Name and Description

    Alternatively, you can issue the DMPRTSETUP command and click .

  2. Enter the name and a description for the new printer (127 character maximum, no backslashes).

  3. Click to proceed to Step 2. Select a printer model. If your exact printer model is not available, select a more general model that is compatible with your printer. For example, for the HP LaserJet printer series, select PCL5.

    Note  

    More general models might provide fewer options than the more specific models. & pound ;

    Display 17-3: Printer Definition Window to Select Printer Model

  4. Click to proceed to Step 3. The following window appears:

    Display 17-4: Printer Definition Window to Select Output Device

  5. 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" on page 277

  6. 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 would be an operating environment-specific file name. With some system device types, the destination might be blank and you can specify the target location using the Host options box.

  7. 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 PROC REGISTRY. Click the Help button in step 3 to refer to the "Populating Destination and Host Option Lists" topic, which contains more details.

  8. Click to proceed to Step 4, in which you select from a list of installed print previewers. If no previewers are defined, proceed to the next step.

    Display 17-5: 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 DMPRTPROPS, Advanced Tab , Previewer box. See "Defining a New Previewer" on page 266.

    Note  

    It is not required that printers and print previewers share a common language.

  9. Click to proceed to Step 5. The following window appears:

    Display 17-6: Printer Definition Window to Complete Process

  10. Click to change any information. Click 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 .

Setting Printer Properties for Your Default Printer

Printer properties that you can change include

To change printer properties for your default printer:

  1. Issue the DMPRTPROPS command. The Printer Properties window appears.

  2. 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.

      Display 17-7: 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" on page 277 for examples.

      Display 17-8: Printer Properties Window Displaying Destination Tab

    • 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.

      Display 17-9: 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.

Display 17-10: Printer Properties Window Displaying Advanced Tab

Resolution

specifies the resolution for the printed output in dots per inch (dpi).

Protocol

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 of the protocol converters that are listed.

Translate table

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.

Buffer size

controls the size of the output buffer or record length. If the buffer size is left blank, a default size will be used.

Previewer

specifies the Previewer definition to use when Print Preview is requested . The Previewer box contains the previewer application that you have defined. See "Defining a New Previewer" on page 266.

Preview command

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.

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 dim.

How to Specify a Printer for Your Session

The PRINTERPATH option enables you to specify a printer to use for the current SAS session. This printer specification is not retained across SAS sessions. PRINTERPATH 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";

You can get a list of valid character strings from two places:

You can also override the printer destination by specifying a fileref with the PRINTERPATH= option:

options printerpath= (myprinter printout); filename printout ...;

Printing with Universal Printing

Printing a Test Page

To print a test page:

  1. Issue the DMPRTSETUP command to open the Print Setup window.

  2. Select the printer for which you would like a test page from Printer listview.

  3. Click .

Printing the Contents of an Active SAS Window

To print the contents of a window in SAS:

  1. Click inside the window to make it active.

  2. Select A print window appears. Your print window might differ from the window that follows .

    Display 17-11: Print Window

  3. If the Use Forms check box is visible, clear it in order to use Universal Printing.

  4. From the Printer group box, select the name of the printer definition.

  5. Enter the number of copies that you want.

  6. If you want to save your print job to a file,

    1. Select Print to File .

    2. Select ; the File Selection window appears.

    3. Select an existing file or enter a new filename.

      Note  

      If you print to an already existing file, the contents of the file may be overwritten or appended, depending on whether you choose replace or append from the print window that is open.

  7. 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.

    selected lines of text in a window

    To print

    Do this

    Note  

    not available on OS/390

    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:

    • n-m prints all pages from n to m, inclusive.

    • -n prints all pages from page 1 to page n.

    • n- prints all pages from page n to the last page.

    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 Verify that the Use SAS/GRAPH Drivers check box is deselected in order to use Universal Printing.

  8. Click to print.

Working with Previewers

Defining a New Previewer

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:

  1. Issue the DMPRTCREATE PREVIEWER command. The following window appears:

    Display 17-12: Previewer Definition Window to Enter Name and Description

  2. Enter the name and a description for the new previewer (127 character maximum, no backslashes).

  3. Click to proceed to Step 2.

    Display 17-13: Previewer Definition Window to Enter Previewer Language

  4. 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.

  5. Click to proceed to Step 3.

    Display 17-14: Previewer Definition Window to Enter Command to Open Previewer Application

  6. Enter the command or commands used to open the previewer application, followed by %s where you would normally put a file name. For example, if the command for starting your previewer is "ghostview," then you would type ghostview %s in the text field.

    Note  

    The %s can be used as many times as needed in the commands for starting the viewer.

  7. Click to proceed to Step 4.

    Display 17-15: Previewer Definition Window to Complete Process

  8. Click to correct any information. Click when you have finished defining your default previewer.

The newly defined previewer will display a previewer icon in the Print Setup window.

Display 17-16: Print Setup Window Displaying New Previewer

This previewer application can be tested with the button on the Print Setup window.

Seeding the Print Previewer Command Box

Print Preview is supported by print previewer applications such as Ghostview, gv, and Adobe Acrobat. The Preview command box that appears in the Previewer Definition wizard and on the Advanced tab of the Printer Properties window can be prepopulated or " seeded " with a list of commands 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. An example of a registry file is:

[CORE\PRINTING\PREVIEW COMMANDS] "1"="/usr/local/gv %s" "2"="/usr/local/ghostview %s"

Previewing Print Jobs

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.

Setting 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 may be unavailable.

To customize your printed output:

  1. Issue the DMPAGESETUP command. The Page Setup window appears.

  2. 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 .

Note  

Although your Page Settings should remain in effect for your current working session, changing default printers could cause some of the settings to have no effect. If you change printers during a SAS session, check the Page Setup window to see if any of your settings are not valid for your new default printer.

Категории