Hi.
I have multiple programs (10) in a folder. They are lengthy. Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder? Thank you. Example: My SAS programs and original table files D:\Data_Trending
I've merged your posts into one, please do not post the same question multiple times.
You can use %INCLUDE with a wild card to call all programs but they may not run in the order you want.
%include 'D:\Data_Trending\*.sas' / source2 lrecl=500;
SOURCE2 tells SAS to still put the code to the log and LRECL specifies the line length of the input program, the default is 256 I believe which can sometimes truncate your code causing issues.
@BaileyY wrote:
Hi.
I have multiple programs (10) in a folder. They are lengthy. Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder? Thank you. Example: My SAS programs and original table files D:\Data_Trending
Hi.
I have multiple programs (10) in a folder. They are lengthy. Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder? Thank you. Example: My SAS programs and original table files D:\Data_Trending
I've merged your posts into one, please do not post the same question multiple times.
You can use %INCLUDE with a wild card to call all programs but they may not run in the order you want.
%include 'D:\Data_Trending\*.sas' / source2 lrecl=500;
SOURCE2 tells SAS to still put the code to the log and LRECL specifies the line length of the input program, the default is 256 I believe which can sometimes truncate your code causing issues.
@BaileyY wrote:
Hi.
I have multiple programs (10) in a folder. They are lengthy. Is there a SAS script that can allow me to write string of code to tell SAS to run all Programs within that folder? Thank you. Example: My SAS programs and original table files D:\Data_Trending
Hello @BaileyY a quick searched reveals many solution to your question.
here is one possible solution.
%macro run_one (path);
proc printto log="&path.log";
run;
proc printto print="&path.lst";
run;
%include "&path.sas";
run;
%mend run_one;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: