I'm trying to check the value of the character macro variable 'char_varzxy ' in a %if condition. The if loop is not being executed even if the condition holds true. Can someone please let me know why %do i=1 %to &N;
/* Code to get the table containing 'FLG' variable on which chi-square test is being run.
*
*
*
*
*/
ods exclude all;
proc freq data=temp2 ORDER=formatted;
tables &variable / TestP=(&P_Values);
ods output OneWayFreqs=FreqOut OneWayChiSq=ChiSData;
output out=FreqStats N ChiSq;
run;
ods exclude none;
data ChiSqData2;
set ChiSData;
num_varu = input(cValue1,32.30);
char_varz= put(cValue1,12.8);
run;
proc sql noprint;
select nValue1 into :nValue1 from ChiSqData2 where Label1='Pr > ChiSq';
quit;
proc sql noprint;
select num_varu into :num_vary from ChiSqData2 where Label1='Pr > ChiSq';
quit;
proc sql noprint;
select cValue1 into :prob_vary from ChiSqData2 where Label1='Pr > ChiSq';
quit;
proc sql noprint;
select char_varz into :char_varzxy from ChiSqData2 where Label1='Pr > ChiSq';
quit;
%if(&char_varzxy ='<.0001') %then %do;
/* Not entering this loop */
%end;
%end;
The chisqdata2 table which contains the character variable is as follows - Table Name1 Label1 cValue1 nValue1 num_varu char_varz Variable FLG _PCHI_ Chi-Square 1246.522 1246.52212 1246.5221 1246.522 Variable FLG DF_PCHI DF 1 1 1.00E-30 1 Variable FLG P_PCHI Pr > ChiSq <.0001 4.73E-273 . <.0001
... View more