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


Please Help Members By Posting Answers For Below Questions

what is data governance? : Sas-di

625


what is null hypothesis? why do you consider that?

2422


How do you use the do loop if you don’t know how many times you should execute the do loop?

753


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

4914


How to test the debugging in sas?

610






how does sas handle missing values in formats? : Sas programming

584


What are the difficulties u faced while doing vital signs table or dataset?

1939


What does the RUN statement do?

854


What are the statements in proc sql?

596


Describe what are the different levels of administrative users in sas? : sas-grid-administration

606


What are the limitations for memory allocation for SAS variables

934


what are the scrubbing procedures in sas? : Sas programming

834


What are the different operating system platforms in which we can use sas? : sas-grid-administration

593


Compare sas with other data analytics tools.

585


what can you learn from the sas log when debugging? : Sas programming

612