11-16-2014 03:33 PM
I need to read in some csv data that does not have any variable names in it. There are 150 character variables that are questions to a test. How can I name these variables (q1,q2,q3,...) without having to list each variable in the input statement?
11-16-2014 05:04 PM
Use proc import with getnames=NO option.
SAS will automatically name the variables var1-var150 and you can automatically rename it
11-17-2014 10:35 AM
If you already know the structure then you do not need to use PROC IMPORT.
data want ;
infile 'myfile' dsd lrecl=30000 truncover ;
length q1-q150 $100 ;