Hello,
My code below runs successfully, but only shows the text of the two variables count_NO_contract and count_NO_sales.
How do I have to change the code?
filename REPORT "%sysfunc(pathname(work))\output.html"; filename SEND email to = "XXX@XXX.com" SUBJECT = "Test Subject" content_type = "text/html" ATTACH = "&PATHNAME"; ods html file = REPORT style = HTMLBlue; PROC REPORT DATA=APPG.AZL_NG_BESTAND; COLUMN workday workvalue; DEFINE workday / GROUP; DEFINE workvalue / F = COMMAX10.; RBREAK AFTER / SUMMARIZE; WHERE workday >= 20220201; RUN; ods html close; data _null_; infile REPORT; file SEND; input; if _infile_ ne '</html>' then put _infile_; else do; PUT 'Process finished'; PUT 'unknown contracts: &count_NO_contract'; PUT 'unknown sales: &count_NO_sales'; end; run;
Thanks
Sascha
Use double quotes instead of single quotes when you want to expand macro variables.
PUT "unknown contracts: &count_NO_contract";
PUT "unknown sales: &count_NO_sales";
Use double quotes instead of single quotes when you want to expand macro variables.
PUT "unknown contracts: &count_NO_contract";
PUT "unknown sales: &count_NO_sales";
The solution has already been given, but do you really store your dates like this:
WHERE workday >= 20220201;
?
If yes, it's a VERY BAD IDEA, as it deprives you of the use of all the nice tools SAS provides for dealing with dates, makes date calculations very hard, and on top you have to use at least 5 numeric bytes to store them. SAS date values need only 4.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.