This procedure helps to find the Pearson correlation coefficient and other measures of association between the variables. After you get the covariance matrix, you can check for the heterogeneity looking at the diagonal values in the covariance matrix. If the values are much different then there is quite an amount of heterogeneity.
(this can be used when you would like to do repeated measures analysis and would like to know whether to use a compound symmetry matrix using say GLM procedure or an unstructured variance/covariance matrix, or use an autoregressive structure by looking at the coefficient table for the repeated observations)
Proc corr data = dataname1
outp = dataname2
cov
vardef = n
plot = scatter
best = 2
fisher (alpha = 0.1 type= twosided)
nocorr
noprob
nosimple
noprint;
var var2 var3 var4
by var1;
run;