BookmarkSubscribeRSS Feed
rb1974304
Calcite | Level 5

HI, I am using SAS AML 7.1 on Oracle DB. For the Regulatory Audit requirement, we need to run existing rules on My two-years-old data. How can I achieve this? Thanks for all the help. 

1 REPLY 1
SASPM
SAS Employee

Some background: The run date used when the AGP is executed is derived from the content of the fsk_job_calendar table. When the AGP runs, the run date applied will be the earliest business day entry in the fsk_job_calendar table where the ‘status_ind’ field is set to ‘N’, indicating that this is the earliest business day for which the AGP has NOT yet been run. When the AGP executes for a run date the ‘status_ind’ field for that date is flipped from ‘N’ to ‘Y’, indicating that the AGP has already been executed on that date. The fsk_job_calendar table also has Day, Week, Month indicators that are used to determine which scenarios are executed on any given run date based upon each scenario’s stated execution frequency (e.g., daily, weekly, monthly).

 

For the question, you would have to reset the fsk_job_calendar entries so that all records prior to the start date (2 years ago) have a ‘status_ind’ set to ‘Y’, and all other records have a ‘status_ind’ set to ‘N’. The next AGP run will then execute for the intended start date (2 years ago). Each subsequent AGP run will move to the next indicated business day in the fsk_job_calendar table. You will have to execute the AGP a total number of times that covers each day over the required 2 year period.

 

The following macro may be useful in initializing the fsk_job_calendar table to begin at the intended start date 2 years ago…

 

%macro set_run_date(RUN_DATE=);

 

  proc sql;

   update db_kc.fsk_job_calendar set status_ind ='N';

   update db_kc.fsk_job_calendar set status_ind='Y'

   where datepart(calendar_date) < &RUN_DATE.d;

  quit;

 

  %fcf_get_runasofdate;

  %put &runasofdate;

 

%mend;