Howdy all, I was given a data set that is bigger than the 1 millions rows that Excel 2007 can handle and I have no other option except doing this in SAS. My data set looks like this, where month 1,2 & 3 are the rolling month period which I need to set up like a macro variable.
Using a DATA step with an ARRAY and an IF/THEN statement, test for a zero value and reset the variable to a missing value. The ARRAY can reference the variable prefix for your "month n" variables and use DO I=1 to DIM(); END; to reset the value.
The SAS support http://support.sas.com/ website has SAS-hosted documentation and supplemental technical and conference reference material -- you can use its SEARCH facility or use a Google advanced search (add the site:sas.com to limit the search) using keywords.
Given the feedback to-date, I would recommend you attempt to make any necessary SAS code changes, re-post your modified code (after your own testing), and seek feedback again if you have difficulties or questions.