Hello All, I have to execute a file AAA from first job. This file (AAA) is suppoose to be appended i.e. MOD. Can I give like this at the end of the first file "%INCLUDE "AAA.sas" MOD ;
Many Thanks
If you created AAA.sas file by:
data out;
file 'AAA.sas' ...any options;
.......
run;
The answer to your question os positive. You can add at end:
%include 'AAA.sas';
In case the creating code is like:
filename outf '..path...AAA.sas';
data out;
file outf ...any options...;
.......
run;
You can end by:
%include outf;
Thanks for your reply Shmuel.
When I am using %include 'AAA.sas' ; without MOD option its giving ERROR: File is in use. Seems during the creation of this file (AAA), it it remains open. Do we have to close this file.
Yes, ofcourse, file should be closed before %include.
Did you closed the data step that created the AAA.sas file with RUN;
before the %include statement
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.