I use SAS EG 7.1. I have a one record table with 150 columns, creatively named fieldname1 - fieldname150. I would like to turn each field's value into a macro variables &fieldname1 - &fieldname150. I have written it out as data _NULL_; set mylib.proj_details; call symputx('fieldname1',fieldname1,'l'); call symputx('fieldname2',fieldname2,'l'); call symputx('fieldname3',fieldname3,'l'); ... ... call symputx('fieldname149',fieldname149,'l'); call symputx('fieldname150',fieldname150,'l'); run; There's got to be a sexier way to do this. I tried using a do loop but couldn't get the second argument (in which I was concatenating "fieldname" and my index variable) to be recognized. Any ideas? Thank you in advance!
... View more