SASTRACELOC= SAS System Option

Specifies the location where SASTRACE= information should be printed.

Valid in: configuration file, SAS invocation, OPTIONS statement
Category: Log and Procedure Output Control: SAS Log
Default: stdout
Data source: Amazon Redshift, Aster, DB2 under UNIX and PC Hosts, DB2 under z/OS, Google BigQuery, Hadoop, HAWQ, Impala, Informix, JDBC, Microsoft SQL Server, MySQL, Netezza, ODBC, OLE DB, Oracle, PostgreSQL, SAP ASE, SAP HANA, SAP IQ, Snowflake, Spark, Teradata, Vertica
Notes: Support for Google BigQuery and Snowflake was added in the August 2019 release of SAS/ACCESS
Support for Spark was added in SAS 9.4M7.
See: SASTRACE= system option

Syntax

Required Arguments

stdout

specifies the default output location for your operating environment.

SASLOG

specifies that trace messages should be printed to the SAS log.

FILE='path-and-file-name'

specifies that trace messages should be printed to a file name that you provide. If you do not provide a path, the file is generated in the current working directory.

Details

SASTRACELOC= lets you specify where to put the trace messages that SASTRACE= generates.

This option and its values might differ for each host.

Example: Specify a Location for the Trace Log

This example writes trace information to the TRACE.LOG file in the work directory on the C drive on a PC platform.

options sastrace=',,,d' sastraceloc=file 'c:\work\trace.log';
Last updated: February 3, 2026