@Kyleuofi wrote:
Let me preface this with I had to cut a lot out of the log, it was 30 mb when it printed to the directory in plain text.
What I'm needing this section of the code to do is loop through the different years, break, an breakdown. create a mean and count and hold those values and append them to the entire table. What is actually being produced is the entire table with 0's for the count and a table that has the first couple rows in the mean summary, and then the rest 0's which we know is not true.
Perhaps this is a time to re-do the code entirely. If you are creating means and counts for many different "groups", this can be done without macros and without looping by using PROC SUMMARY and/or PROC FREQ. And so this part of the log (and possibly other parts as well) can be eliminated from a loop and done in one or two PROCs with BY variables.
MPRINT(FILLTABLEENTIRE): select count(*) into :pcount from _master where dem_rac='dekalb' and year='2015';
MPRINT(FILLTABLEENTIRE): select median(months) into :med_lena from _master where dem_rac='dekalb' and year='2015' group by year ;
MPRINT(FILLTABLEENTIRE): select months into :lmona from _master where dem_rac='dekalb' and year='2015' group by year order by months;
But I realize you might not want to re-write the whole thing, although in my mind that would be the best solution.
... View more