Email from dataset is not switchable like that, you would need to wrap it in macro, something like:
%macro SendMail (bha=);
data _null_;
%if &bha.=0 %then %do;
file outbox from=mymail to=xxx subject='reports';
put 'Good Day';
%end;
%else %do;
file outbox from=mymail to=xxx subject='reports' attach=(&all_files.);
put 'attach are reports';
%end;
run;
%mend SendMail;
%SendMail (bha=1); /* For no reports, just change 1 to 0 */
Email from dataset is not switchable like that, you would need to wrap it in macro, something like:
%macro SendMail (bha=);
data _null_;
%if &bha.=0 %then %do;
file outbox from=mymail to=xxx subject='reports';
put 'Good Day';
%end;
%else %do;
file outbox from=mymail to=xxx subject='reports' attach=(&all_files.);
put 'attach are reports';
%end;
run;
%mend SendMail;
%SendMail (bha=1); /* For no reports, just change 1 to 0 */
There are various substitutions that cannot be used as a parameter expansion. You have to map the root directory as well as you have to make sure that name will not be used in the directory name.
For more access plugins uae
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.