Yes, the only restriction is that you include complete statements, not partial statements. You cannot do
data _null_;
set have;
if x > 0 then %include 'myFile.sas";
run;
That doesn't work. But you can do:
data _null_;
set have;
if x>0 then do;
%include "myFile.sas";
end;
run;
But you must remember that the inclusion will occur even if x <= 0. The do block will not be executed, but the code from myFile.sas will be included.
Hope that helps.
PG
PG