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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.