Hi expers,
I would like to run ten programs in the same SAS folder with different names. The following program 'test_combine_sample.SAS' is one of them. I found out my %Include didn't work.
%let dirb=%str(\\C:\document\project\user\programs\sas\); %include "&dirb.test_combine_sample.sas";
The log showed that
ERROR: Cannot open %INCLUDE file
\\C:\document\project\user\programs\sas.test_combine_sample.sas
I feel strange that I did add backslash '\' in the macro dirb. However, it seems like SAS didn't read that. Please let me know how to fix this problem. Thank you.
Never mind, I know where went wrong.
One thing is when I add two lines together, the code works.
%include "\\C:\document\project\user\programs\sas\test_combine_sample.sas";
When seperating into two lines as shown above, the '\' between 'SAS' and 'test_combine_sample.sas' is missing
Never mind, I know where went wrong.
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 25. 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.