Thanks Quinn; I am being told that 12 is the maximum. However, what if one didn`t know the max?
1. use COUNTC() function.
2. use the variable prefix as the array name.
Hope it helps.
L.L.
proc sql;
select max(countc(TrainingTopic,';'))+1 into: max_ct from ...;
quit;
data ... ;
...
array Topic(&max_ct) $100 ;
...
Wondering, what does the * do rather than putting the max # of observations in the () in : array parsed_vars(*) new_var1-new_var6;
Trying to understand the diff between putting parsed_vars(*) vs. parsed_vars(6)?
Also, what if you didn`t know the max # of observations? what would you do in that case if you only wanted the first 6?
Thanks!
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.