Hi All,
i have exported the cars from sashelp. for my sas programming practice, again i am trying to import with rename option, but the data set variable names are not changing
proc import datafile="d:\IQ\cars_1.xls"
out=ds3 (rename=(MSRP=msrp_1))
dbms=excel replace;
run;
Have you checked the column properties?
You might be seeing MSRP as label but actually it was changed to msrp_1.
For me this code worked:
proc export data=sashelp.cars
outfile="d:\cars_1.xls" dbms=xlsx replace;
run;
proc import datafile="d:\cars_1.xls"
out=ds3 (rename=(MSRP=msrp_1))
dbms=xlsx replace;
run;
You can see column properties by double clicking on column:
@kranthikumari wrote:
Hi All,
i have exported the cars from sashelp.
Show us the code that did this export.
Also, since we are trying to help you, please help us by going back and edit your original post and provide a meaningful title. A title of "SAS" is not meaningful, every question is about SAS.
If "sas" is all you can come up with as a descriptive subject line, your future with SAS looks very bleak. Working with complex software requires effort on your part.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: