In my company, I run a process once a month after another one is finished. To know that it is finished, I manually look at the following table (it has about 100 more rows in reality):
Latest date for finishing the process
Date when the process was finished
Process has begun
31-jan-22
05-jan-22
1
28-feb-22
04-feb-22
1
31-mar-22
03-mar-22
1
30-apr-22
05-apr-22
1
31-maj-22
.
0
30-jun-22
.
0
31-jul-22
.
0
31-aug-22
.
0
30-sep-22
.
0
31-okt-22
.
0
30-nov-22
.
0
31-dec-22
.
0
31-jan-23
.
0
28-feb-23
.
0
31-mar-23
.
0
30-apr-23
.
0
Assuming we are currently standing in april-2022. Since there is a date (05-apr-22) in the column "Date when the process was finished" I know that the process has been finished and I can run my process. An extra sanity check is that the column "Process has begun" should have a 1 in the row for the relevant month. So if there is a date in the relevant row I should run my process. BUT, this should only be done once every month. Next month, in May I will every day look when the middle column gets an date:
31-maj-22
.
0
when it has I will run my process.
Obviously, this is a manual process that can be automatized and my goal is to set up an SAS Program that perfroms the test (say once day) which will be done automatically by scheduling the SAS program. Any advice how I could write a SAS program to perform the desired test? I also want to emphasize, that if we are standing in april 2022 for instance:
30-apr-22
05-apr-22
1
then the 05-apr-22 I could run my process, but I should not run it anymore that month, so I should continue to next month and check when there comes an date. I also know that in the column "Date when the process was finished", when there is something filled up it should be the same month and year as in the column: Latest date for finishing the process. Else something is wrong. I hope it is clear what I mean, appreciate your help!
... View more