Hi all,
I have been trawling the internet trying to work out the appropriate function, so I am hoping that someone can assist.
What I want to do is send an email only when the dataset has an observation (or more than one). I have set up a Macro which sends the email, however am having trouble allocating a variable which can be resolved.
I am using the below code and the marcro at the bottom of my code will run where appropriate. The problem is that when the dataset is empty EMAILREQ will not resolve to N.
Does anyone have any ideas??
data _NULL_;
set agedebt_unknowns;
if _N_ >= 1 then CALL SYMPUT("EmailReq",'Y');
else CALL SYMPUT("EmailReq",'N');
Run;
Thanks for your help.