Hi there, I need to create a counter inside of a macro. I can get it to work fine with a data step, but I am having trouble getting it to work inside of the macro. Please could you help, I'm not sure if the %sysfunc is in the wrong place. The code below was my attempt; %let Start_date =%sysfunc(input(%sysfunc(strip(%sysfunc(put(201503,6.))))||'01',yymmdd10.)); %let Curr_Date =%sysfunc(input(%sysfunc(strip(%sysfunc(put(201505,6.))))||'01',yymmdd10.)); %let counter = %sysfunc(intck('month',&Start_date.,&Curr_Date.)); %put &counter.; %do i = 1 %to &COUNTER.; Thanks in advance. Note: using EG 7.1
... View more