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;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.