Ah, this is it!
Now I should change my question.
How do I assign the 4000-ish SYM_ROOTs dynamically into, say, 40 equal macro variables to use it in WHERE clause?
So instead of using
where SYM_ROOT=:'A'
where SYM_ROOT=:'B'
etc
which would vary in size, I would like to have equal subset of SYM_ROOT to put it in the WHERE clause of my main analysis code. Each day would be different, so it has to depend on the total number of obs of SYM_ROOT on daily bases.
I searched a few postings but mostly they rely on additional group identifiers. In my case there aren't any.
Take the total number of obs, from sashelp.vtable, divide it by 40 and split your dataset into your 40 subsets by the number of records.
If you need to keep the groups together, then consider seeing if you can tweak a PROC SURVEYSELECT to do it for you.
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.