Hi, the situation I have is a list of macro variables like follows; var_2030 var_2031 var_2032 etc. During the data step, which involves a loop, I need to use more than one: data test; x=2; do i=1 to 3; %let t=2030+i; If x<&&var_&t then put 'success'; %end; run; Unfortunately, &&var_&t resolves as (var_2030) + i instead of (var_(2030+i)). I've tried using %let t=%sysevalf(2030+i) but it then complains that there is a character variable instead of numeric. I also understand this may be related to macro values being evaluated before data steps are executed, so is this possible? Thanks very much.
... View more