I have one SAS dataset that has a column with values that I want to use as a macro variable. Say the SAS dataset looks like this with one column:
varname
34
367
399
87
What I want is for all of the values in the column to become a concatenated string in a macro variable (suitable for using in an if
statement with the in
operator). The result would be equivalent to this:
%let var = %str('34','367','399','87');
How would I accomplish this?