In my dataset, I have many variables that end with the suffix _RND. For each observation in these variables, if the value is less than 0, I would like it to be 0 and if the value is greater than 3, I would like it to be 3. I've gotten so far as to be able to identify all of the variables in the dataset that end with the suffix and stored it in a list called rounded_scores (using the code below in SAS 9.4), but I dont know how to invoke this list and have the procedure repeated on each of these variables. proc contents data=Henry out=contents(keep=name) noprint ; Run; proc sql noprint ; select name into :rounded_scores separated by ' ' from contents where upcase(name) like '%^_RND' escape '^' ; quit; Thanks in advance for any help you can give!
... View more