I have dataset below : Below is macro code : %macro zero_check;
data testing;
set Test3;
if TOTAL_PAYMENTS_TO_DATE_LATEST in (0,.) and TOTAL_PAYMENTS_TO_DATE_PREVIOUS notin (0,.)
then call symputx("val",1);
else call symputx("val",2);
/*run;*/
run;
%put value=&val;
%if &val=1 %then
%do;
filename SENDMAIL EMAIL to=("test@email.COM") subject="Found zero on TOTAL PAYMENTS TO DATE of Payments file but had a value previously";
data _null_;
file SENDMAIL;
put 'This email serves as notification that the value of column TOTAL PAYMENTS TO DATE of Payments file contains zero or blank';
put /;
put "File Name: &filename.";
put /;
put 'This message was sent from a notification-only email address that does not accept incoming email. Please do not reply to this message.' ;
run;
%end;
%else %do;
%end;
%mend;
%zero_check; based on above condition the value should be resolved to 2 instead it resolving to 1. 1009 %put value=&val;
value=1 can somebody help me with this.??
... View more