BookmarkSubscribeRSS Feed
tnachis
Fluorite | Level 6

I have an existing report and need  to write a conditional scheduling for the report. 

 

The report is a monthly report. For every new month we need to generate report for the previous Month ended. for instance in beginning of February 2022, we need to generate the report for EOM 31st January 2022. 

 

Additional Information:

Step 1:

 

For every latest report published/generated, we need to save the Report date of the report in a table called the Config table; for instance, for December report 31/12/2021, we need to save the latest report date 31/12/2021 in a Config table. Hence for every Month we generate a report we need to update/refresh the report date saved in the Config table with the latest date.  then, every Month, we need to compare the report date saved in the config table with the expected report Date (Previous Month date) the report was to be generated. If both dates matches then exit, else if both dates doesn't match then proceed to step2.  

 

Step 2: 

The query should check through Table A and Table B. If both conditions below are True, then generate/publish the report but if any of the condition is false we need to wait the next day to check the conditions again.

 

Conditions: 

If data/variable "A" is available in table A on end of previous Month for instance 31st January 2022 then publish.

and If data/variable "B" is available in table B on end of previous Month for instance 31st January 2022, then publish/generate  the report

 

that is; If the two conditions above are TRUE then publish / generate the report else wait till the next day and check again. 

A 
Date variable 
31/01/2022A
30/01/2022 
29/01/2022A

 

B 
Date Variable 
31/01/2022B
30/01/2022B
29/01/2022B

 

1 REPLY 1
Reeza
Super User
What tools are you using? What have you done so far?

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 279 views
  • 0 likes
  • 2 in conversation