BookmarkSubscribeRSS Feed
teja5959
Obsidian | Level 7

don't want UNSCHEDULED  but some time sufficient res is available in UNSCHEDULED  have been assigned.eg .. look at on want data set 

 

i have data in this type 


data have;
length id no res visit $200;
infile datalines dsd truncover;
input id no res visit $;
datalines;
003,1,sufficient,visit1
003,1.1,5.6,UNSCHEDULED 1.1
003,2,5.5,visit2
003,3,5.8,visit2
004,1,6.0,visit1
004,1.1,6.5,visit1
004,2,7.0,visit2
004,3,7.2,visit3
004,1,interact,visit1
004,1.1,9.3,UNSCHEDULED 1.1
004,2,8.4,visit2
004,3,7.2,visit3
005,0.1,6.9,UNSCHEDULED 0.1
005,0.1,7.4,UNSCHEDULED 0.1
005,0.1,5.9,UNSCHEDULED 0.1
;
run;

 

 

i want as data this type 

 

data want;
length id no res visit $200;
infile datalines dsd truncover;
input id no res visit $;
datalines;
003,1.1,5.6,UNSCHEDULED 1.1
003,2,5.5,visit2
003,3,5.8,visit2
004,1,interact,visit1
004,2,7.0,visit2
004,3,7.2,visit3
;
run;

1 REPLY 1
ed_sas_member
Meteorite | Level 14

Hi @teja5959 

 

Could you please explain the rules that should apply?

Thank you very much.

 

Best,

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 686 views
  • 0 likes
  • 2 in conversation