DATA Step, Macro, Functions and more

batch run output to the same folder where programs are

Reply
Super Contributor
Posts: 312

batch run output to the same folder where programs are

[ Edited ]

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
...

 

Super User
Super User
Posts: 7,407

Re: batch run output to the same folder where programs are

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.

Ask a Question
Discussion stats
  • 1 reply
  • 96 views
  • 0 likes
  • 2 in conversation