Chapter Contents

Previous

Next
SAS Companion for the CMS Environment

Routing to External Files with SAS System Options

As described in Introduction, you can specify SAS system options in a SAS command or in a SAS configuration file. You can use these options to change the destination of the SAS log and procedure output. The options that you use depend on whether you want to make a copy of your SAS log or procedure output, or whether you want to route it only to an external file.


Routing Your SAS Log or Procedure Output to an External File

Use the LOG= and PRINT= system options to change the destination of your SAS log or procedure output.

For example, specify the LOG= option in the SAS command as follows to send the log file to the disk file HOUSES LOG1 B:

sas (log='houses log1 b'

LOG= and PRINT= have no effect in the windowing environment. If you are running SAS in the windowing environment, use the ALTLOG= and ALTPRINT= system options. See Copying Your SAS Log or Procedure Output to an External File .

You can use any form of the file-specification parameter to describe the destination of the file. See Identifying an External File for information about different ways of specifying destinations for these files.


Copying Your SAS Log or Procedure Output to an External File

Use the ALTLOG= and ALTPRINT= system options to send a copy of your SAS log or procedure output to an external file. The log and procedure output are also displayed in the log and output windows as usual (if you are running SAS in the windowing environment), or are otherwise routed to their default destinations.

For example, the following SAS command begins an interactive line mode session in which the log and procedure output files appear on the terminal and a copy of the log is written to the disk file SEPT25 TESTS C:

sas (nodms altlog='sept25 tests c'

You can also specify the ALTLOG= and ALTPRINT= system options in a configuration file. See System Options in the CMS Environment for information on these options.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.