how to change variable name from q1a to q1 without affeting my data
many thanks for your help. The problem is solved
It's easy, but you left out too much information.
What is the name of your data set?
Should this be a permanent change, or just a temporary change for one DATA or PROC step?
hi,
I have excel file & would like to make it SAS file.
I go to SAS then import the file. it forces me to save it as work file. but I can't open it after.
I am used to xxx.file name. How to do this? thanks in advance
This has absolutely nothing to do with your original question.
Is your first question already answered?
You still need to provide details. How are you trying to import the file? Is there a log?
1. re 1st question: sorry. the 1st question has not been answered. you asked me to send more info. & I did via email last night.
2. re second question: I highlight the excel file & after saving it as exclpdf. I go to sas & try to import it. the problem is I can not save it as XXX.FILENAME.
please excuse my ignorance with SAS I used it while doing my master & PH.D more that 30 years ago. I am trying to help some one else using my data/. appreciate your help.
@wagdy wrote:
how to change variable name from q1a to q1 without affeting my data
Use proc datasets or proc sql with alter table.
@wagdy, please update the title of this thread to something meaningful.
Surely you understand that a title of "Please Help" is not meaningful, that a title that actually describes the problem would be more meaningful. Click on the Gear icon next to your original post, select Edit Message, and then provide a meaningful title that actually (and succinctly) describes the problem.
thanks for your response.
my question is: how to change variable name from q1a to q1 without affeting my data. regards
You need to change the title on your ORIGINAL post in this thread to something meaningful.
@andreas_lds wrote:
@wagdy wrote:
how to change variable name from q1a to q1 without affeting my data
Use proc datasets or proc sql with alter table.
proc datasets library=work nolist;
modify datasetname;
rename q1a=q1;
run; quit;
If your dataset is in some other library than WORK, then use the library name instead of WORK. Also, you have to use your actual data set name instead of where I used datasetname.
many thanks for your help. The problem is solved
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.