I am building a program to assess rolling client retention. Periods are defined as 1 year, moving forward by one month. (Jan 2012-Jan 2013, Feb 2012-Feb2013…) If a client purchased in period 1 and period 2, he is retained. If a client purchased in period 1, but not period 2, he is not retained. If a client purchased in period 2, but did not purchase in period 1, he is a new client. To do this, I need to construct left, inner and right joins for an arbitrarily large number of dates and clients. For example, I want to be able to look at the change in client retention for period 41 to period 42. As you can see by my attached SAS program, I have painstakingly accomplished this task by writing 2500 lines of code. Now I need to make it more efficient. There are only two variables in the input files: date and customer number.
input cust_num $ invoicedate : mmddyy10.;
format invdate mmddyy10.;
NEED HELP WRITING YOUR PAPER?
PLACE AN ORDER WITH US TODAY AND ENJOY A 10% DISCOUNT. USE DISCOUNT CODE: Disc10