Good morning. I would very much appreciate any help someone might give me.
We have a process that runs on the 15th of each month. There is code that is contained within this process and I only want the code to run on the 15th day after the end of each quarter of the year. Our shop can set the code to run on the 15th of each month, or each day, but the code itself must check the date to determine if it is April 15th, July 15th, October 15th or January 15th and only run on those dates.
Attached is the current date definition portion of the code. You can see it does determine the dates (today, current quarter, etc.). However, I guess what I need is for the code to decide if it is the 15th day after the quarter. I could accomplish it with hard coding the month or day but I was hoping someone had a better answer?
Thanks for any help someone could give me.
data params; attrib run_date length=8 format = mmddyy10. beginqtr length=8 format = mmddyy10. endingqtr length=8 format = mmddyy10. rep_start_date length=$10 rep_end_date length=$10 file_name_qtr length=$6; run_date = today(); beginqtr=intnx('qtr',run_date,-1,"BEGIN"); endingqtr=intnx('qtr',run_date,-1,"END"); rep_start_date=put(beginqtr, mmddyy10.); rep_end_date=put(endingqtr, mmddyy10.); file_name_qtr=put(beginqtr, yyq6.);
call symput("run_date",run_date); call symput("beginqtr",beginqtr); call symput("endingqtr",endingqtr); call symput("rep_start_date",rep_start_date); call symput("rep_end_date",rep_end_date); call symput("file_name_qtr",file_name_qtr); call symput("file_name_qtr",file_name_qtr); run;
... View more