SASg,
First, a note of forum etiquette: just post a question to one forum.
Here is a solution. It uses the RETAIN statement to create a variable that can be used as a flag to determine if the first record is a "Refferal".
This could also be done with PROC SQL if one assumed the first date in an ID group is also the earliest and is unique within the group. Both of those conditions exist in your example, but may not be there in a larger data set.
Doc Muhlbaier
Duke
DATA first;
FORMAT DATE MMDDYY8.;
INFORMAT date mmddyy8.;
LENGTH status $8.;
input id date status days;
cards;
112 03/02/09 Approved 4
112 03/03/09 Refferal 3
112 03/04/09 shipped 2
112 03/06/09 shipped 3
113 04/01/08 Refferal 2
113 04/02/09 Approved 1
113 04/03/09 Ahipped 1
run;
DATA results;
SET first;
BY id;
RETAIN flag;
IF first.id THEN
IF status='Refferal' THEN flag=1;
ELSE flag=0;
IF flag=0 THEN DELETE;
DROP flag;
RUN;