It helps to show the entire code when you get an error. Some things that may help: use option NOPRINT on the Proc Corr statement to reduce the printed output which takes memory trying to format things. Direct the desired statistics to data sets.
You may have to break the data into groups. If you use the -- operator , that is two dashes, in a variable list then the variables that are in order are selected;
with TC01000005_hg_1 -- TC01000019_hg_1; would select adjacent columns in the data set with the leftmost the first variable and the last being the right-most column of that group.
I have to say that when you said you had 1000s of variables I was afraid there might be a memory issue.
... View more