We have two SAS data sets:
One
www.sankhyana.com
One
Name | Age | Salary |
Ram | 27 | 5000 |
Sita | 28 | 6000 |
Radha | 21 | 3000 |
Arjun | 20 | 8000 |
Ram | 27 | 5000 |
Radha | 21 | 3000 |
Arjun | 20 | 8000 |
Sita | 28 | 6000 |
Bhim | 19 | 7000 |
Two
Name | Age |
Ram | 27 |
Sita | 28 |
Radha | 21 |
Arjun | 20 |
Bhim | 19 |
We need to create a SAS data sets by merging SAS data sets one and two.
Three
Name | Age | Salary |
Bhim | 19 | 7000 |
Arjun | 20 | 8000 |
Radha | 21 | 3000 |
Ram | 27 | 5000 |
Sita | 28 | 6000 |
Now prepare your Base SAS and Advance SAS Certification Exams with Online Mock tests: http://exam.sankhyana.com
For training related info kindly mail us at info@sankhyana.comwww.sankhyana.com
data three;
ReplyDeleteinfile datalines;
input Name$ Age Salary ;
datalines;
Ram 27 5000
Sita 28 6000
Radha 21 3000
Arjun 20 8000
Ram 27 5000
Radha 21 3000
Arjun 20 8000
Sita 28 6000
Bhim 19 7000
;
run;
data four;
infile datalines;
input Name$ Age;
datalines;
Ram 27
Sita 28
Radha 21
Arjun 20
Bhim 19
;
run;
data five;
set three;
x=_n_;
run;
data six;
set four;
x=_n_;
run;
data seven;
merge five six;
by x;
run;
proc sort data=eght
out=ten nodupkey;
by name;
run;
proc sort data=ten
out=eleven(drop=x);
by descending x;
run;
proc sort data=eleven
out=twelve;
by age;
run;