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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.