BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PratapDeo
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18
Sorry, and why do you need MOD ?
There in no MOD option with %INCLUDE.

View solution in original post

7 REPLIES 7
Shmuel
Garnet | Level 18

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;

Shmuel
Garnet | Level 18
Sorry, and why do you need MOD ?
There in no MOD option with %INCLUDE.
PratapDeo
Calcite | Level 5

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.

Shmuel
Garnet | Level 18

Yes, ofcourse, file should be closed before %include.

PratapDeo
Calcite | Level 5
Can you please help me how we can close the file before %include.
Shmuel
Garnet | Level 18

Did you closed the data step that created the AAA.sas file with RUN

before the %include statement  

PratapDeo
Calcite | Level 5
Oh Gotcha...my issue got resolved ...thanks alot 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1020 views
  • 0 likes
  • 2 in conversation