I have two pieces of code that I only want run in January. Currently they are running every month which is fine but very ineffiecient. I am saving history by month for the current year and the december file for the three previous years. The second code is only taking last december data. I set it up this way so the end user doesn't have to change anything or have any extra steps. BUT, I'd like to set it up so this piece of code only runs in January. Any help will be appreciated.
Thank You,
data testhistory;
set testhistory;
where year(reporting_date) = year(&yeardate) or
reporting_date = &yeardate11 or
reporting_date = &yeardate22 or
reporting_date = &yeardate33;
run;
data testdec;
set testdec;
where reporting_date = &yeardate11;
run;
where month(reporting_date) = 12
Richard
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.