The CORR function supports missing values:
proc iml;
use sashelp.class;
read all var _NUM_ into X;
X[{1 7 19 32}]=.;
c = corr(x);
print c;
print (countmiss(X,"col"));
In fact, you can have all missing values and hte CORR function still doesn't return an error:
X = j(10,3,.);
c = corr(x);
print c;
This assumes that you are running SAS/IML 9.22 or later. Please copy/paste the EXACT contents of the SAS log.
By the way, if you use optional arguments, be sure to enclose them in quotes
corr(x,"Pearson","pairwise");
as specified in the doc.