Hi, All, Based on the current date batch I have (20120229) I want to go back 24 months and grab the month end (20100228). Right now, I can do it with INTNX and CALL SYMPUT. At the same time, I want to do the same thing with %let. However, I am a little lost and confused and don't know how to get it. Please offer suggestions if you can, Thanks. Joe /*WORKING*/ %let batch=20120229; data _null_; oldbatch=INTNX('month',input (put(&batch,8.), YYMMDD8.),-24, 'end'); call symput ('batch2',trim(left(put(oldbatch,yymmddn8.)))); run; %put check the value of: &batch2; /*NOT WORKING*/ %let batch_c= %sysfunc (putn(&batch,8.)); %let batch_d= %sysfunc (inputn(&batch_c,YYMMDD8.)); %let batch3= %sysfunc(intnx('month', &batch_d, -24, 'end'));; %put check the value of: &batch_c, &batch_d, &batch3;
... View more