Tried that for other variables and still having trouble which is why I am switching to macros. This one doesn't like the &year_start1 which was created from the first symput. Yearlotend is a data variable that holds the years 2012, 2013, 2014, 2015, 2016 from a dynamic table produced from a proc freq out= option. The future PROC SQL looks at the last day of the prior year (12/31/{2 digit prior year} which is why I need to assign a global variable. It doesn't necessarily have to be a two-digit year but it doesn't work even with the full year (yearlotend) entered into the first call symput. If you have any solutions that might help me understand this better would be helpful because if it will be easier than maintaining macros that would be great! data _NULL_; set yearplan ; yearlotend2=input(substr(put(yearlotend,4.),3,2),2.)-1 ; suffix=put(_n_, 5.) ; call symput(cats('year_start',suffix),yearlotend2); call symput('projstart', "'"||catx("/","12/31",&year_start1.)||"'") ; run; %put &projstart;
... View more