I have an ID list
%let study1_ids="ab","xy","we","st","ut","po","vc","gh"; (study 1)
Now, for another study (let's say study 2) with a different set of IDS, I need to go over each ID list (which is entirely different from the above list- but for each id, I need to assign each id above.
For ex
abc (study 2) = ab (study 1)
d3e (study 2) = xy (study 1)
Thoughts?
@saslove wrote:
I have an ID list
%let study1_ids="ab","xy","we","st","ut","po","vc","gh"; (study 1)
Now, for another study (let's say study 2) with a different set of IDS, I need to go over each ID list (which is entirely different from the above list- but for each id, I need to assign each id above.
For ex
abc (study 2) = ab (study 1)
d3e (study 2) = xy (study 1)
Thoughts?
Question the need for quotes and commas in that study1_ids.
This makes no sense in SAS: what are ABC, AB, d3e or xy. If they are values of a variable then what is the name of the variable?
abc (study 2) = ab (study 1) d3e (study 2) = xy (study 1)
Provide a few concrete examples with values from both "lists" and what the result should be.
This sort of sounds like you probably should have the values involved in data sets and then SQL to match things.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.