data std;
input id no sdate date9.;
format sdate date9.;
cards;
2 4 19JAN2012
3 5 19JAN2012
4 6 19JAN2012
5 7 19JAN2012
6 8 19JAN2012
run;
data change;
input id no sdate date9.;
format sdate date9.;
cards;
2 4 20JAN2012
3 5 20JAN2012
4 6 20JAN2012
5 9 20JAN2012
6 10 20JAN2012
7 11 20JAN2012
8 12 20JAN2012
;run;
Req 1:
--------
In the both above tables i want to append the observations from change to std table that are modified and not exesting
based on id and no
Output for table std
id no sdate
2 4 19JAN2012
3 5 19JAN2012
4 6 19JAN2012
5 7 19JAN2012
6 8 19JAN2012
5 9 20JAN2012
6 10 20JAN2012
7 11 20JAN2012
8 12 20JAN2012
Req 2:
--------
I want to create from table std new table called keep_change in this i want to keep the records that are changed based
on id and no and wnat new variable called endadte (The end date is nothing but the sdate on previous obs).
id no sdate endadte.
5 7 19JAN2012 20JAN2012
6 8 19JAN2012 20JAN2012