BookmarkSubscribeRSS Feed
fengyuwuzu
Pyrite | Level 9

When I want to run many SAS programs in a batch mode (see below), the output were generated in the same folder as where the programs are, and ALSO in the folder that I specified in the setup.sas file, which is a subfolder.

How to fix this dual output issue? I want the output only in the subfolder that I specified in setup.sas. 

 

path="C:\Program Files\SAS\SASFoundation\9.2(32-bit)"; path

call sas dm.sas
call sas sv.sas
call sas se.sas
call sas ae.sas
call sas cm.sas
call sas da.sas
call sas ds.sas
call sas eg.sas
call sas ex.sas
...

 

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

It is default behaviour to output any output to the run location if no paths are supplied.  Within your program you can re-direct your output to files by giving path/name in the correct place.  You can also redirect the log and the output to where you want by using:

proc printto log="path/file";

run;

For example.

You would still get a .log in the directory, but all other output you can re-direct them.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 549 views
  • 0 likes
  • 2 in conversation