|SAS Companion for UNIX Environments|
If you choose to use host printing, you must first turn on host printing and set up your printer devices. You can set up a printer device to send output to a printer or to a file that is compatible with a specific Postscript or PCL printer. After you set up a printer, you can change options such as fonts, margins, orientation, and page size.
Note: Printer device definitions are stored in your
SASUSER.PROFILE catalog. You cannot use profile catalogs from previous releases
of SAS. If you have been running a revious release of SAS, rename the PROFILE.SCT01
file located in your SASUSER directory before you start your SAS session.
|Turning Host Printing On and Off|
Host printing is not available by default, so you must turn host printing on before you will be able to access the host printing menus. Host printing can be turned on
DMS Tab in The Preferences Dialog Box
Use host printing, and then select [OK]
to close the Preferences dialog box.
After you turn host printing on, the
Print Utilities selection in the File pull-down menu is replaced with two new selections:
Host printing will remain active until you turn it off.
You can turn host printing off by issuing the DLGPRTMODE GRAPH command or
Use host printing in the Preferences dialog box.
|Setting Up Your Own Printer Devices|
If you are a system administrator and you are creating printer
device definitions for use by all of the users at your site, see Setting Up Printers for All Users at Your Site.
To set up your own printer devices, open the Printer Setup dialog box either by issuing the DLGPRTSETUP command or by selecting
Printer Setup Dialog Box
SAS automatically defines one
printer device for you:
Print PostScript to disk. This device formats output in generic Postscript
using Courier font with no margins and prints the output to a file named
prn.ps in the current directory. Your SAS Installation Representative
might have also defined other devices for your site. Your default printer
device is highlighted. To change your default printer device to another device
that is already defined, simply select the new default device and select [OK].
For each new printer device that you want to define, follow these steps:
New.... SAS builds a list of the printer types available at your site and prompts you for the name you want to assign to the device you are creating.
Note: At any point during this set-up process, you can select
<-Previous to return to the previous step.
Enteror select [Next->]. You can enter up to 99 characters in the name. Use a name that distinguishes this device from the others that you define such as "Apple printer with one-inch margins." SAS then prompts you to enter which type of printer device that you are defining.
After you select a printer type, press
or select [Next->] to select an output destination.
Printerand type the command necessary to route output to the printer that you are defining. Include the full pathname of the command.
To send output compatible with the selected printer
to a file, select
File and type the filename to which you want to send
Note: If you are using a LaserJet printer in PCL or
HPGL mode, you will probably want to create two printer device definitions:
one for text and one for graphics. When you are printing graphics in PCL or
HPGL mode, you may need to add the
-oraw option to your
-oraw option is
not available on your system, contact SAS system administrator for additional
PostScript printer devices can be used for printing
text or graphics.
Enter or select
to finish the process of defining the printer device.
Finishto return to the Printer Setup dialog box.
At this point, you can do any of the following:
|Removing a Printer from the Selection List|
To remove a printer device from the selection list, open the Printer Setup dialog box by issuing the DLGPRTSETUP command or select
|Changing Printer Device Properties (Fonts, Margins, Other Options)|
To change the properties for a printer device, issue the DLGPRTSETUP command or select
Printer Properties Dialog Box
Font: field and the [Font...] and [Margins...] buttons will
not appear if this dialog box is invoked from a GRAPH window. Fonts and margins
set through this dialog box affect only printing from text windows. To change
fonts and margins when printing from GRAPH windows, use the GOPTIONS statement.
Route output to
File, the text field contains the name of the file. If you select
Printer, the text field contains the command that is needed to route your output directly to the named printer. You can edit the filename or command as needed.
Note: After you have finished defining all of the options
for your printer device, check these line size and page size values. Make
sure than the LINESIZE and PAGESIZE system options specified for your application
are less than or equal to the line size and page size that SAS has calculated
for the current printer options.
2.54 cm, the Margins dialog box will display
1.00"the next time you open the dialog box. Increasing the top or bottom margins will decrease the page size value displayed in the Printer Properties dialog box, and increasing the left or right margins will decrease the line size value.
Select [OK] when you have finished.
When you print from a GRAPH window, you must use a GOPTIONS statement to set the font and margins. Font and margin settings that are entered through the UNIX dialog boxes have no effect when you print from GRAPH windows.
When you select [Options...] from the Printer Properties dialog box, SAS displays the Printer Options dialog box.
Printer Options Dialog Box
To change the paper size,
resolution (in dots per inch),
or paper tray, select the down arrow to the right of the field and select
the value you want. The resolution is listed in dots per inch (dpi). Most
printers are either 300 or 600 dpi. Higher dpi values produce sharper text
and graphics. To change the orientation, select
The value in the
Scale: field tells the
printer device how large the output should be. To enlarge your document, enter
a number greater than 100. To reduce your document, enter a number less than
100. For example, a scaling factor of 50% will print your document at half
of its original size, and a scaling factor of 200% will print your document
at twice its original size. To change the scale, either type a new number
Scale: field or select the arrows to the right of
the field. If you increase the scale value, the line size and page size values
shown in the Printer Properties dialog box will decrease. If you decrease
the scale value, the line size and page size values will increase.
When you have finished making changes, select [OK].
The Host Fonts dialog box allows you to change the windowing environment font and the printer fonts that will be used when you print from text windows.
To change printer fonts, you must access the Host Fonts dialog box through the Printer Properties dialog box by selecting [Font...]. Changing the font for a printer device will change the line size and page size values shown in the Printer Properties dialog box for that printer. For a complete description of the Host Fonts dialog box, see Customizing Fonts.
The default printer font for PostScript printers is Courier, and the default font for PCL printers is HP Lineprinter. (The Host Fonts dialog box for printers does not have a [Default] button.)
Note: SAS output is formatted for a monospace font (each
character is the same width) such as Courier, Lineprinter, or Letter Gothic.
Using a proportional-space font (the width of the characters vary) such as
Helvetica or Times produces an improperly formatted report. If you select
a proportional font, SAS will display a message that warns of unpredictable
results and column misalignment in your output.
|Specifying Your Default Printer Device|
To change the default printer device, open the Printer Setup dialog box either by issuing the DLGPRTSETUP command or by selecing
The SAS System looks for default printer definitions in
OPTIONS XPRINTNM='HP LaserJet in Room 123';If you misspell the name or use the wrong case (uppercase or lowercase), SAS will display an error message stating that it cannot find the printer. See XPRINTNM for more information.
Note: If you change the
default printer using the XPRINTNM
system option, this change is reflected in the Printer Setup dialog box. However,
if you change your default printer through the Printer Setup dialog box, this
change is not reflected in the value of the XPRINTNM system option.
|Setting Up Printers for All Users at Your Site|
If you are the SAS Installation Representative for your site, you can set up a catalog that contains printer definitions available on the system and make this catalog available to all users at your site. As part of this process, you choose a default printer.
$SASROOT/sashelpdirectory. Write access to this directory may require root access. See your system administrator for details.
After you set up the printers for your site, when users invoke the Printer Setup dialog box, they will be able to choose any of the printers that you have defined as their default printer.
|Adding New XPRINTER Devices|
If your site acquires a new printer or plotter model, you might need to add the new device to the list of XPRINTER devices that the user can select. To add new printer or plotter devices, follow these steps:
You can add your own Postscript, PCL4, or PCL5 device drivers to the list of device drivers that SAS Institute distributes. However, SAS Institute is not able to provide support or fixes for your own device drivers.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.