I am using the yearlist in a loop like this one below. I am using this approach because the other loop use a list of define cie subfolder and so on.
%let yearlist=2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025;
%macro test;
%do k=1 %to %sysfunc(countw(&yearlist.));
%put %scan(&yearlist.,&k);
%end;
%mend test;
%test;
So I am looking for a way to generate the yearlist.
This one seems a good way
data _null_;
length yearlist $500;
do year=2001 to year(date());
yearlist=catx(' ',yearlist,year);
end;
call symputx('yearlist',yearlist);
run;
other idea ?
... View more