Actually the macro call would execute where it is, but the result would be far from what is expected.
If we resolve the first pass at the macro we would get:
data _null_ ;
set Overall;
subGroup="g" ||compress(var1,' ') ||"c"||compress(var2,"-") ;
call execute ( "data " || subgroup||";" ||
"set Overall ( where =( group = " || put(var1,1.) || " and centre = '" || put(var2,7.) || "'));" ||
"run ;" ) ;
*********** SAS would assume a "RUN;" here.
data subVis;
set subgroup;
if sub_visit=1 and group=1 then do;
output LTsubVis;
end;
run;
run;
so the SAS system would see a second Data step, assume a run; stop the execution of the Data _null_ ; and process data subVis. The macro would process there if it contained code which would execute within the data _null_.
... View more