Hi All, The following SAS code creates a dataset list that contains the variable snapshot (in yyyymm format) from 200309 to 201603. There is a "if" condition that is supposed to result in only the snapshots 200309 to 201506 being populated. However, the "if" condition does not work. Please advise on why this is so. Any help would be much appreciated. Thanks! %let strte=200309;
%let ende=201506;
%macro download;
data list(drop=i);
do i=0 to 150;
index=i;
snapshot=put(intnx('month',input("&strte.",yymmn6.),i),yymmn6.);
output;
end;
if snapshot<="&ende.";
run;
%mend download;
%download;
... View more