Hi, I'm very new to SAS. I've tried reading through similar topics and it seems as though what I'm trying to do can't be done, but it seems like such an essential of programming that I'm struggling to get round it. Is it possible to execute a macro, passing incrementing variables? This and varaints of it throw errors. I want to iteratively create a series of tables (I realise I've taken out the changing table names as I'm trying to simplfy my code to see where the errors are). It looks like using Call Execute might work, but it seems a bit clunky... %Let CLV_Months = 36; Option MPRINT; %Macro CreateChurn(ChurnRate); Data ChurnCurve; PC_Live = 1; Retain PC_Live; do i = 0 to &CLV_Months; PC_Live = PC_Live * (1-&&ChurnRate); Output; End; Rename i = Month; Run; %Mend CreateChurn; Data CCM; Do MN = 1 to 10; M1 = MN/100; %CreateChurn(&M1); End; Run; Any assitance greatly appreciated. Regards, Rob
... View more