Too close to call. A few seconds difference between using name ranges vs. a macro variable. That kind of difference could go either way each time the code is run, probably without any clear pattern (or at least that's my experience with run times this close together).
However, since all the code is already written, let me run it a couple of times. It takes less than 15 minutes per run. I'll report back.
Jim
I've run the tests several times now with 500 million rows each. The CPU run time differences between the various form of variable reference in the MIN(of XXX) don't seem to matter much including the array reference.
The one thing that stands out is that the all array method takes about 7.5 minutes but the MIN(of XXX) methods take about 5.5 minutes each. The MIN(of XXX) method taking 5.5 minutes is pretty consistent no matter if the variable set is specified by range(s), a macro var, or by an array reference. My first run showed some slowness in an array reference, but that appears to have been a one time thing.
Jim
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.