@kmardinian wrote:
Hi ballardw, I appreciate you taking the time to help me with this. But I am still a bit confused.
Just to clarigy, my macro variable &ab1 is actually a numeric variable and is >0 for certain tests.
data ab; set t6_&vorder (where=(&var = 'False')); run; proc sql noprint; select count(unique(SUBNUM)) into :ab1 from ab; quit; %put &ab1=&ab1;
I am still stuck on one issue. I will never know how many tests (there are 10 total tests) will have more than 0 false results. So I would need to create combinations of all the possible scenarios for each %do %end statment. This would be so many different combinations!
Is there no possibility of coding it so that the footnote is a macro variable that I could then use in my proc report statement. For example:
%macro dummy (test,testnumber);
proc print data=sashelp.class (obs=3);
var name sex;
%if &abtest1>0 %then %do;
Footnote_&testnumber "This is the first footnote";
%end;
run; footnote; /* turn off further footnotes*/
%mend ; dummy(test1,1); dummy(test2,2); Proc Report Statement: compute after _page_/left style={bordertopcolor=black bordertopwidth=1 just=l font_face='Courier New' font_size=8pt}; line "&footnote_1."; line "&footnote_2."; endcomp; run; ods pdf close;
Your footnote macro variables created in the first macro, if they were actually created, cease to exist after the macro runs so that text would not be available in proc report.
The footnote syntax is Footnote1 footnote2 etc. The code you have with footnote_1 etcs will generate syntax errors.
I think it is time for you to provide either example data or cast your whole problem as using a SAS supplied set like SASHELP.CLASS,
do something to generate whatever that abtest variable(s) look like and the actual NON-macro code you want generated by any macro. I can't quite follow what you are attempting with mixing statements like FOOTNOTE and similarly named macro variables (that don't exist). You should show the entire Proc code for each provided example including your actual footnote values. Repeat NO macro variables at all. You can indicate, preferably on a line by line basis dependencies expected.
For the cases related to "I will never know how many tests (there are 10 total tests) will have more than 0 false results. So I would need to create combinations of all the possible scenarios for each %do %end statment. " show at least some of the combinations.
Also remember that macro calls require the % at the front of the name. A simple call such as dummy() will generate errors
... View more