BookmarkSubscribeRSS Feed
teja5959
Fluorite | Level 6

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,

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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