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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.