Hello everybody! I was wondering if somebody could help me with my problem. Basically I have a SAS macro variable which is a list of the variables that are present in a SAS data set and I am cycling through those variables and would like to say cap those variables that are > 254. Here is the sample code ..... blah-blah-blah... the list of the variable names are put into the sas macro variable called modelvars. %macro get_capped(); data a; set b (obs=100); %let j = 1; %do %until (%scan(&modelvars.,&j,%str( ))= %str()); %let var=%upcase(%scan(&modelvars.,&j,%str( ))); %if &var. > 254 %then &var. = 254; %let j = %eval(&j +1); %end; run; %mend get_capped; %get_capped; The RED code is the one that I am stuck on. I know that the variable name resolved to TEXT, but how do I make SAS compiler treat that text as if it was the name of the actual variable in the data set and then cap that variable? Any help would be greatly appreciated! Thanks!
... View more