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

what is the difference between infile and input? : Sas-administrator

0 Answers  


Can you excute a macro within a macro? Describe.

2 Answers   Genta,


Did you used proc lifetest? when?

2 Answers   Accenture, Parexel, Quintiles,


What is the purpose of trailing @ and @@? How do you use them?

0 Answers  


what is syntax of proc merge ?

7 Answers   TCS,






What is the significance of the ‘OF’ in X=SUM (OF a1-a4, a6, a9);?

8 Answers  


what is slowly changing dimension? : Sas-di

0 Answers  


What is the difference between %local and %global?

1 Answers  


What is difference between Global n Local Macro Variables..?

6 Answers   TCS,


i have a dataset with 25 obs; 10th obs has like ramu,anji,ramu,azad,ramu like this. i want to know how many times the word repeats in that obs?

3 Answers  


If you’re not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?

8 Answers   Accenture,


Which function is used to count the number of intervals between two sas dates?

0 Answers  


Categories