data t ;
array v(100) x1-x100;
do i=1 to 100 ;
stop;
output;
drop i;
end;
run;How many ways to create 100 variables at a time in a single data step
and how many variables we can sort is there any limit to sort
I don't know what the upper limit is for number of sort keys for PROC SORT, but I'm sure it can accommodate 100. I'm also sure it would be slow.
Have you tested your data step code? It has a STOP in the middle of a do loop, which otherwise would produce 100 observations of 100 variables, each defaulting to a missing value. As it is you will produce a data set of zero observations, with 100 variables.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.