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 do the pad and dim functions do? : Sas programming
what is enterprise guide? What is the use of it? : Sas programming
how will you location sas platform applications available from web browser? : Sas-bi
What does PROC print, and PROC contents do?
Differentiate between sas functions and sas procedures.
what are some differences between proc summary and proc means? : Sas programming
Approximately what date is represented by the SAS date value of 730?
Mention the difference between ceil and floor functions in sas?
what is program data vector? : Sas-administrator
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
What are all the problems you faced while validating tables and reports?
What is the difference between input and infile statement?
Explain the purpose of substr functions in sas programming.
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
Why and when do you use proc sql?