O'Reilly logo

Step-by-Step Programming with Base SAS 9.4, Second Edition, 2nd Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 24
Directing SAS Output and the
SAS Log
Introduction to Directing SAS Output and the SAS Log . . . . . . . . . . . . . . . . . . . . 391
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Input File and SAS Data Set for Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Routing the Output and the SAS Log with PROC PRINTTO . . . . . . . . . . . . . . . . 393
Routing Output to an Alternate Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Routing the SAS Log to an Alternate Location . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Restoring the Default Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Storing the Output and the SAS Log in the SAS Windowing Environment . . . . . 395
Understanding the Default Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Storing the Contents of the Output and Log Windows . . . . . . . . . . . . . . . . . . . . . . 396
Redefining the Default Destination in a Batch or Noninteractive Environment . 396
Determining the Default Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Changing the Default Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Understanding the Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
PROC PRINTTO Statement Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
SAS Windowing Environment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
SAS System Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Learning More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Introduction to Directing SAS Output and the SAS
Log
Purpose
SAS provides several methods to direct SAS output and the SAS log to different
destinations. In this section, you learn how to use the following SAS language elements:
PRINTTO procedure from within a program or session to route DATA step output,
the SAS log, or procedure output from their default destinations to another
destination
FILE command, in the SAS windowing environment, to store the contents of the Log
and Output windows in files
391

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required