The dataset I would like to import has some repeat column names, but changing the column names in the raw dataset is not an option. When I run the following script, SAS is deleting all the columns that have repeating column names. However, when my colleague runs the exact same script in his machine, SAS is automatically renaming the repeat column names with adding _1, _2...at the end. We would like to import the dataset with SAS renaming the repeat column names instead of deleting them. We are not sure if that has something to do with SAS EG setup? Or can we add something in the following script to make the import consistent.
proc import out=WORK.SURVEY_00_Import
datafile = "J:\DATA\Appeals Eligibility Rescoring Tool\Input\Survey Extract Raw.sav"
dbms = SAV replace;
fmtlib = WORK.FORMATS;
run;
Try this in your SAS session: options VALIDVARNAME = V7;
Try this in your SAS session: options VALIDVARNAME = V7;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.