yes, You are correct.how to change my Var name
You probably got variables name as var1-var8 using proc import,
because your data does not include first row with colomn labels.
You can rename variables either in the out clause of proc import, as:
out=contest(rename=(var1=FName var2=LName var3=age ...etc. ...))
or, alternativly, use as second step:
proc datasets lib=<libarary holding the dataset>;
modify contest;
rename var1=FName var2=LName var3=age ...etc ...;
run; quit;
sir!!! thank you so much i got the output.Just one thing need to clear, shall i specify my own length for the each variables?? if possible how can i make please give me as solution.
Renaming the variable name does not change its length.
You may select specific character variables, only if you find it preferable, and redefine their length.
It is not a must.
You can't change the length in a PROC DATASETS only rename. You can use a data step to do both.
If you've already assigned a length and are just renaming the variables a new length won't change the variables value.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.