Hi,
Every month I receive a data dump of indicators and counts by id.
the tables are loaded in the following manner:
src.indicators_20110131
src.indicators_20110228
src.indicators_20110331
etc..
the latest month should always have more records than the previous.
and look like this:
id count1 ind1 count2 ind2
1 3 1 0 0
2 0 0 2 1
..
essentially if the count exists the indicator is a 1, else 0 .
What I want to do is to create a checking program that looks at the %change in # records from the previous month.
My current logic/checking program is quite manual and I hope to alter it to be more automatic with some sort of iterative processing.
My program now looks like:
%let month1 = 20110131
%let month2 = 20110228
etc.
proc sql create table src.check_&month1 as
select count(*) as numrows_&month1
from src.indicator_&month1 ;
code above repeated for every months data, then datastep to merge [merge check:] .
I havent completed the calculation step yet.
This was just a first stab at it, and is very manual (every month I would have to add a proc sql step above.
If anyone has any suggestions that would be great.
Thanks for your help!
... View more