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

Under what circumstances would you code a SELECT construct instead of IF statements?

7 Answers   Accenture,


Why double trailing @@ is used in input statement?

0 Answers  


How do dates work in sas?

0 Answers  


Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated

1 Answers  


SAS using companies in chennai

1 Answers  


How long can a macro variable be? A token? : sas-macro

0 Answers  


diff between nodup rec and ondup key???

3 Answers   AON, Sciformix,


Hi All.I am looking for Good Institute who could Provide the online SAS BI+DI Training along with software.Primarily in Delhi/NCR or in Hyderabad Please help with name and contact number of concerned person!! Thanks in Advance! :)

1 Answers  


When merging 2 datasets with a common variable (not merge key), how to keep both?

3 Answers  


which date function advances a date, time or datetime value by a given interval? : Sas programming

0 Answers  


What happens in the following code, if u type 8 instead of *? proc sql noprint; create table abc as select 8 from lib.abc; quit;

3 Answers  


What are the differences between proc means and proc summary?

0 Answers  


Categories