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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.