SAS has a really neat function called intnx, which will increment a date to the next of an interval.

For example, if you have a date (any date. maybe the current date?), you can get the date of the first day of the next month by doing this:

data _null_;
  d = '11JUN2011'd;
  format d date9.;
  put d;
  d = intnx('month',d,1);
  put d;
run;

Which outputs

11JUN2011
01JUL2011

Here’s a clever way to get the “Last Day” of the current month. The last day of the current month is the day before the first day of the next month. SAS Dates are internally stored as a number of days since some point, so just subtract one from it.

data _null_;
  d = '11JUN2011'd;
  format d date9.;
  put d;
  d = intnx('month',d,1)-1;
  put d;
run;

Which outputs

11JUN2011
30JUN2011