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;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.