I'm using SAS 9.1.3 to call a macro in a DATA step, but the macro generates a PROC REPORT step, so I am using CALL EXECUTE to call it, generate all those PROC REPORT steps, and then execute them all after the DATA step.
I'm using an array, and the macro is executed each time for every element in this array:
DATA macro_test;
ARRAY questions[3] $ 32 ('question1' 'question2' 'question3');
DO i=1 to 3;
a_question = questions(i);
CALL EXECUTE( "%report_by_question(a_question)" );
end;
RUN;
The thing is, the report outputs are coming out (usually) backwards - it will print question3 first, then 2, then 1.
Is there a way to modify the execution order of CALL EXECUTE so I can have the question reports print in order, or does it just do its own thing?
Thanks!