You have PROC SQL or PROC MEANS / SUMMARY to use - with MIN/MAX/SUM options to assign/derive output variables. Check the SAS DOC for these options - also there is much "free" information on the SAS support http://support.sas.com/ website, including SAS-hosted DOC and supplemental technical / conference topic-related references.
Also, you need to identify the "break" or "group by" column/variable - it's not obvious from the data-example provided.
I just need to roll up contigious dates in different months. In the example the last 3 days of january and the first five days of february need to be combined so that the begin date would be that jan 29 and the end date would be Feb 5th. That is all I need to do. I wuold have three records instead of 4.
Here is one way. hth.
/* test data */
input id (begindate enddate) (:anydtdte.);
format begindate enddate yymmdd10.;
1 2003-01-08 2003-01-10
1 2003-01-15 2003-01-18
1 2003-01-29 2003-01-31
1 2003-02-01 2003-02-05
2 2003-11-29 2003-11-30
2 2003-12-01 2003-12-02
2 2003-12-03 2003-12-04
2 2003-12-05 2003-12-06
2 2004-01-01 2004-01-01
2 2004-01-02 2004-01-03
/* collapse adjacent spells into one within id. assumed no overlaps. */
proc sort data=one;
by id begindate enddate;
do until (last.id);
set one end=end;
if end then do; link doOutput; stop; end;
set one(firstobs=2 keep=begindate rename=(begindate=nextBegindate));
if last.id or enddate + 1 ^= nextBegindate then link doOutput;
else if missing(b) then b = begindate;
if not missing(b) then do;
begindate = b;
keep id begindate enddate;