Using SAS System Options to Route Output


Changing the Output Destination using the LOG, PRINT, ALTLOG , and ALTPRINT System Options

You can use SAS system options to change the destination of the SAS log and procedure output. The options that you use depend on which task you want to accomplish:

  • To route your SAS log or procedure output to an external file instead of to their default destinations, use the LOG and PRINT system options.

  • To route the log or output to an external file in addition to their default destinations, use the ALTLOG and ALTPRINT system options. This method works in all modes of running SAS.

LOG and PRINT are normally used in batch and interactive line modes. These system options have no effect in the windowing environment. If you are running in the windowing environment, use the ALTLOG and ALTPRINT system options.

You can specify these options in following locations:

  • the SAS command

  • a configuration file

  • the SASV9_OPTIONS environment variable.

For example, you could specify these options in the SAS command as follows :

 sas -log '/u/myid/log' -print '/u/myid/prt'   sas -altlog '/u/myid/log' -altprint '/u/myid/prt' 

See "Ways to Specify a SAS System Option" on page 18 for more information.

Creating Postscript Output with the PRINTCMD and SYSPRINT System Options

You can use the pstext UNIX command, the PRINTCMD and SYSPRINT system options, and the PRINT command to create PostScript output. The PRINTCMD option sets the UNIX print command that SAS will use, and the SYSPRINT option specifies a destination.

You can use the pstext command as your print command and redirect or pipe the output of that command. For example, the following options send your output through the pstext command and then redirect the output of that command to the file named /tmp/file.ps :

 options printcmd='pstext';   options sysprint='>/tmp/file.ps'; 

When you issue the PRINT command, SAS creates the file /tmp/file.ps .

The following options send your output through the pstext command and then pipe the output of that command to the lp command:

 options printcmd='pstext';   options sysprint=' lp -dmylaserjet'; 

When you issue the PRINT command from within SAS, the PostScript output is sent to the printer named mylaserjet.




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net