You must customize the
SAS Studio output environment to perform any of these tasks:
To customize the SAS Studio output environment, first
disable the default output environment in order to conserve system resources. Next, establish
your own output environment, and then
execute the SAS statements that are required to generate your output. Use
ODS statements, ODS procedures, or ODS options in your SAS program to define the environment
that you need.
As a best practice,
if your SAS program requires a customized output environment in SAS
Studio, your program should always perform these steps:
-
Create a file reference for your
ODS output. You can use the &_SASWS_
macro variable that is defined in SAS Studio to reference your home
directory as shown in the following statement:
filename odsout "&_SASWS_/charts";
If you want to store your image files in a separate directory, create a second file
reference for your image files as shown in the following statement:
filename ods1out "&_SASWS_/charts/images";
Note: The directories that you
specify must already exist, and you must have Write access to the
directories.
-
To conserve system resources, disable the default output environment by using the
following statement:
ods _all_ close;
-
Open the desired ODS destination. Use the PATH= option to specify the file reference
that you created
for your ODS output. If you created a separate file reference for your image files,
use the GPATH= option
to specify the image
output file reference. Here is an example:
ods html path=odsout gpath=ods1out file="saleschart.html";
-
Execute the SAS statements
that are required to generate your output.
-
Close your ODS destination.
When you disable the default SAS Studio output environment, results are no longer
displayed on the
Results tab for the duration of your program. The results are generated only by the ODS destination
that you open.