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