Hi! I'm quite new to SAS and would like your help on the following:
I'm trying to perform a do loop using macro variables from a specific start date to a specific end date.
I want the macro to perform on the startdate and the startdate + 1 month at a time. For instance:
startdate = Jan
Enddate = Dec
The first iteration should select Jan and Feb. Second iteration should select Feb and Mar. And this should be repeated until Nov and Dec.
Any help or tips on how I should approach this would be appreciated. Again, I'm new to SAS and not quite sure how macro coding works yet.
Thanks!
I think more context is needed. Saying you want JAN and FEB on the first iteration ... okay, how will JAN and FEB actually be used within the macro? Also, JAN and FEB ought to have year associated with it.
I think more context is needed. Saying you want JAN and FEB on the first iteration ... okay, how will JAN and FEB actually be used within the macro? Also, JAN and FEB ought to have year associated with it.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.