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 your favorite all time computer book? Why?
What do the PUT and INPUT functions do?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
what is study design in while working with SAS? what are screening variables in SAS?
Which function is used to count the number of intervals between two sas dates?
How we can call macros with in data step? : sas-macro
Explain what Proc glm does?
Give some examples where proc report’s defaults are different than proc print’s defaults?
what are input dataset and output dataset options? : Sas programming
What are the difference between sas functions and procedures?
describe how to adjust the performance of data integrator? : Sas-di
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
How do you specify the number of iterations and specific condition within a single do loop?
what is business intelligence? : Sas-bi
what is hierarchy flattening? : Sas-di