Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is difference between rename and lable in sas?

Answer Posted / gopi

1) rename can be used as statement or dataset option to
change the name of variable.
2) label, if used as a statement it changes or assigns label
to a variable and if used as a dataset option it changes or
assigns label to the dataset.

Reaname:

a) If you use rename data set option for input dataset, then
SAS renames the variable name in Input dataset.

Data new;
x=1;
y=2;
run;

Data ren ;
set new(rename=(x=z));
run;
This will create ren dataset with z and y variables, and you
can use z varible in the same data step if you want to do
any calculations.


b) If you use rename data set option for output dataset,
then SAS renames the variable in output dataset.
Data new;
x=1;
y=2;
run;

Data ren (rename=(x=z));
set new;
run;
This will create ren dataset with z and y variables, and you
can not use z varible in the same data step if you want to
do any calculations.



3)You can use Rename as statement also, in which case it
effects only output dataset. i.e you can not use the renamed
variable in same data step in calculations

Label:
a) If you use label statement in data step, it assigns or
changes the label name for a variable permanently.
b) If you use label statement in proc step, it assigns or
changes the lable name for a variable temporarily for that
proc step.
c) If you use label as dataset option it assigns label to
the dataset, but not the variable.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the prime responsibilities of data integration administrator? : Sas-di

1064


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

1271


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

2099


What are the functions used for character handling?

1252


What are the scrubbing procedures in sas?

1000


Explain proc sort?

1092


what are some differences between proc summary and proc means? : Sas programming

1121


what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

1148


What are the implications?

1704


what versions of sas have you used (on which platforms)? : Sas programming

1068


Intern stastical programmer written test

745


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

1939


What is the basic structure of the SAS base program?

1318


What is factor analysis?

1130


which features do you use to check the data validations and errors? : Sas-administrator

1052