Previous Page | Next Page

Routing the SAS Log and SAS Procedure Output

Overriding the Default Log and Output Destinations under OpenVMS

Each method of running SAS has a default destination for the SAS log and procedure output files, but you can override these defaults with either SAS system options (when you invoke SAS) or the PRINTTO procedure (while you are running SAS).

Controlling Output Destinations Using SAS System Options

Two system options control the destination of the SAS log: LOG= and ALTLOG=. Two similar options control the destination of procedure output: PRINT= and ALTPRINT=. The LOG= and PRINT= system options change the default destination of the SAS log and procedure output; the output does not appear at the original default destination. The ALTLOG= and ALTPRINT= system options send a copy of the output to the new destination; the output also appears at the original default destination. These options can be specified only when you invoke SAS or a new SAS process.

Controlling Output Destinations Using the PRINTTO Procedure

If you want to reroute the SAS log or the procedure output after you enter your SAS session, you can use the PRINTTO procedure with the LOG= and PRINT= statement options. Unlike the ALTLOG= and ALTPRINT= system options, the PRINTTO procedure does not send the output to both the new and default destinations; only the specified destination receives output. You must use the PROC PRINTTO statement before the SAS log entries or procedure output you want to route are generated. When you want the output to revert to the default destination, use a PROC PRINTTO statement with no statement options.

Previous Page | Next Page | Top of Page