I have 2 data sets A & B. Both have a variable called Age in
them, each of them specifying a different functionality.

In my program I use bot these data sets. How do I specify
which Age variable I want to use?

Answers were Sorted based on User's Feedback



I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / santosh

as per my understanding this is the solution
without renaming the variables the only way is to do using
proc sql;
select a.age,b.age from a,b;
quit;

Is This Answer Correct ?    1 Yes 0 No

I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / presha badiyani

use rename option

Data a1;
input A $20 @50 age;

Data b1;
input x b age;

Data c;
set a1 b1(rename age=b1_age);
If age = b1_age;
run;

Is This Answer Correct ?    6 Yes 6 No

I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / poojavaibhav

Deepak please explain the word functionality in detail.

But if i have to answer above question then i think if you have var that have same name in different dataset and you want to use them both then rename one of the variable and apply condition..

thanks.

Is This Answer Correct ?    0 Yes 0 No

I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / alok karan

Data a1;
input y age;

Data b1;
input x age;

Data c;
set a1 b1(drop=age);
run; 

Is This Answer Correct ?    0 Yes 0 No

I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / kush

proc sql;
select Variable_name
from Variable_name.DataSet_name;
run;

Is This Answer Correct ?    1 Yes 2 No

I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a di..

Answer / nbohr02

Use a two level name.

Data a1;
input A $20 @50 age;

Data b1;
input x b age;

Data c
If a1.age = b1.age;

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More SAS Interview Questions

explain the key concept of sas? : Sas-administrator

0 Answers  


How would you identify a macro variable?

0 Answers  


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

0 Answers   Accenture,


firstobs and obs are working only option wise,but we are using infile statement with firstobs and obs in a statement wise? so firstobs,obs working at options and statemnts or not?

1 Answers  


Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 900 250 3 300 300 a 400 250 b 500 320 c 800 650 x 200 190 y 900 250 z 300 180 i want create new dataset having id and paid_amount who are paid high amount comparing amount. ex: 1d paid_amount 3 300 c 650 x 190

3 Answers  


What are the default statistics for means procedure?

0 Answers  


What is interleaving in SAS?

0 Answers  


Where do the database management systems store data and how do u import them.

2 Answers   L&T,


Name validation tools used in SAS

0 Answers  


how to import XTP files into SAS datasets?

1 Answers   Barclays, Institute For Plasma Research,


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

0 Answers   Quintiles,


How to read multiple excel sheets from a single excel file at once????

7 Answers   HCL, Verinon Technology Solutions,


Categories