BookmarkSubscribeRSS Feed
sandra17
Calcite | Level 5

Hello,

This is regarding the continuous enrollment. I have the initial and final datasets below and In the initial data set, even though the FEB Record is missing still it needs to come as continuous enrollment.

Could anyone of you help on this?

Initial Table
mem_idplanbdateedate
123a1/1/20141/31/2014
123a3/1/20143/30/2014
123b4/1/201404/31/2014
123b5/1/20145/30/2014
123b6/1/201406/31/2014
123a7/1/20147/30/2014
123a8/1/20148/31/2014
123a9/1/20149/30/2014
Final Table
mem_idplanbdateedate
123a1/1/20143/30/2014
123b4/1/201406/31/2014
123a7/1/20149/30/2014
2 REPLIES 2
Astounding
PROC Star

Here's an easy way, as long as these are the only variables involved.  Assuming that the data are properly sorted as you have illustrated:

proc summary data=have;

  by mem_id plan notsorted;

  var bdate edate;

  output out=want (keep=mem_id plan bdate edate) min(bdate)=bdate max(edate)=edate;

run;

If you have additional variables that need to be carried through the process, it can get more complicated.

Good luck.

sandra17
Calcite | Level 5

Thank you so much,it did worked.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 885 views
  • 4 likes
  • 2 in conversation