Are these data the whole content of your dataset?
If it is, it is much achieved.
set yourdataset end=last;
retain _start _obs ;
if _n_ eq 1 then do; _start=start_dt; _obs=obs;end;
if last then do; _end=end_dt; output; end;
keep _obs id _start _end;
If you have a couple of groups of id ,then using 'first.id' 'last.id' to get it.
It somewhat looks like the previous post in this forum?? Weird!!
this is what I like about discussion forums: discovering how many different ways there might be to interpret a question ( let alone the number of ways to program the assumed answer)
Here is it min(start) and max( end) or first.start and last.end
or something else???