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
what is data governance? : Sas-di
what is null hypothesis? why do you consider that?
How do you use the do loop if you don’t know how many times you should execute the do loop?
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
How to test the debugging in sas?
how does sas handle missing values in formats? : Sas programming
What are the difficulties u faced while doing vital signs table or dataset?
What does the RUN statement do?
What are the statements in proc sql?
Describe what are the different levels of administrative users in sas? : sas-grid-administration
What are the limitations for memory allocation for SAS variables
what are the scrubbing procedures in sas? : Sas programming
What are the different operating system platforms in which we can use sas? : sas-grid-administration
Compare sas with other data analytics tools.
what can you learn from the sas log when debugging? : Sas programming