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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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