HI All,
i have below mentioned data.
data tab1;
input custid$ @6 saledate mmddyy10. @17 variety $9. @26 quantity ;
format saledate mmddyy10.;
datalines;
240w 02-07-2003 ginger 120
240w 02-07-2003 protea 180
356w 02-08-2003 heliconia 60
356w 02-08-2003 anthurium 300
188r 02-11-2003 ginger 24
188r 02-11-2003 anthurium 24
240w 02-12-2003 heliconia 48
240w 02-12-2003 protea 48
356w 02-12-2003 'ginger' 240
;
run;
i made below macro for same.
%macro new (flowertype=);
proc print data=tab1;
where variety ="&flowertype" & custid="&id";
run;
%mend;
%new (flowertype=ginger);
Can anyone tell me how to make macro of dates. Like i make flowertype and its ginger when i will mention any flowertype in macro then it will give me print. Same way i want to make macro of Date. if i will mention particular date then macro will show me the result of that date only.
Like this?
%macro new (date=);
proc print data=tab1;
where saledate ="&date"d ;
run;
%mend;
%new (date=07feb2003);
Yes.
Thanks alot
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 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.