I have one main program Main.sas
and several sub programs.
In Main.sas
, I define several macro variables.
%let startdate = ..;
%let enddate = ..;
%let path = ....;
Then I call sub programs via %include
%include "&path.\print1.sas";
I have one main program Main.sas
and several sub programs.
In Main.sas
, I define several macro variables.
%let startdate = ..;
%let enddate = ..;
%let path = ....;
Then I call sub programs via %include
%include "&path.\print1.sas";
Your %include
seems fine to me. I'd be looking at your &path
variable first (assuming it isn't really balabala
) for something simple, but it is more likely that the problem is that you have an unbalanced statement, comment, or string in your plot1.sas
. It might run fine on its own, depending on which editor you are using, and still have a problem.
See if this question on unbalanced quotes helps.
It is a good practice to delimit macro variables with a dot when you use them as part of a larger string: %include "&path.\plot1.sas"
The dot is there to let the macro facility know that the name of the macro variable ends at the character "h" of "path".
As Robert points out, use options source2;
to see the code submitted by the include statement.
If the above do not help, please post your plot1.sas
code, it may have an unbalanced quote or similar issue as Leo suggests.