What is difference between rename and lable in sas?
Answer Posted / subhashish nanda
Rename is used to change the variable name, while label
option is used to change the dataset name.
For Ex:
data ds1 (rename=(sex=gender sal=income));
infile datalines;
input id name$ sex$ age salary;
datalines;
001 abc m 23 45000
002 def f 34 67000
003 mno m 21 36000
;
run;
data ds2(label=sample);
infile datalines;
input id name$ sex$ age salary;
datalines;
001 abc m 23 45000
002 def f 34 67000
003 mno m 21 36000
;
run;
Here label option changes the dataset name as sample. So
dataset will be as per label i.e. sample, but when we will
open it we will view as ds2.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?
What areas of SAS are you most interested in?
Can you execute macro within another macro? : sas-macro
How do you test for missing values?
describe how to adjust the performance of data integrator? : Sas-di
Enlist the syntax rules followed in sas statements.
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
Explain data_null_?
Of all your work, where have you been the most successful?
Mention what is the difference between nodupkey and nodup options?
how to change the execute of macro
What are symget and symput? : sas-macro
: and & modifiers.
Are you sensitive to code walk-throughs peer review or QC review?
Explain what is data step?