SAS IML use of Mattrib with Macro (symget) in a loop
问题 In an IML proc I have several martices and several vectors with the names of columns: proc IML; mydata1 = {1 2 3, 2 3 4}; mydata2 = {1 2, 2 3}; names1 = {'red' 'green' 'blue'}; names2 = {'black' 'white'}; To assign column names to columns in matrices one can copypaste the mattrib statement enough times: /* mattrib mydata1 colname=names1;*/ /* mattrib mydata2 colname=names2;*/ However, in my case the number of matrices is defined at execution, thus a do loop is needed. The following code