In reply to Rick Wicklin.

I am using SAS 9.3 but still following program is not running

Proc iml;
PCOR = {1.00 0.40 0.40,
0.40 1.00 0.40,
0.40 0.40 1.00};
dsNames = {A B C}; /* specify names of data sets */
do i = 1 to ncol(dsNames);
pvar = diag(vecdiag(pcor))*i;
create(dsNames[i]) from pvar; /* create work.A, then work.B, and so on */
append from pvar;
close (dsNames[i]);
end;

Error:
5078 create(dsNames[i]) from pvar;
-
22
76
ERROR 22-322: Expecting a name.