Help using Base SAS procedures

Eliminate Nulls

Accepted Solution Solved
Reply
Contributor
Posts: 38
Accepted Solution

Eliminate Nulls

Currently my dataset looks like this.

    dateCallInboundOutboundSchedule
Fri, Nov 1, 2013 Good
Fri, Nov 1, 2013Good
Fri, Nov 1, 2013 Low
Fri, Nov 1, 2013 High

I would like it to look like the below

    dateCallInboundOutboundSchedule
Fri, Nov 1, 2013 GoodGood High Low

Thanks

Fred


Accepted Solutions
Solution
‎12-04-2013 01:07 PM
Super User
Posts: 5,516

Re: Eliminate Nulls

Posted in reply to fred_major

Given that the data is already sorted, you should be able to get away with this:

data want;

   update have (obs=0) have;

   by date;

run;

Good luck.

View solution in original post


All Replies
Super User
Posts: 11,343

Re: Eliminate Nulls

Posted in reply to fred_major

Will you ever have more or less than 4 values for your date? Is the data sorted by date? Is your date an actual SAS date value or a string?

Contributor
Posts: 38

Re: Eliminate Nulls

Yes it will be around 60 and it could grow, i only put the first 4 columns for this example.


Date is Type = Number length 8 format weekdate17.

Date is sorted.

Thanks

Fred

Solution
‎12-04-2013 01:07 PM
Super User
Posts: 5,516

Re: Eliminate Nulls

Posted in reply to fred_major

Given that the data is already sorted, you should be able to get away with this:

data want;

   update have (obs=0) have;

   by date;

run;

Good luck.

Contributor
Posts: 38

Re: Eliminate Nulls

Posted in reply to Astounding

Thanks you very much.

Fred

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 234 views
  • 0 likes
  • 3 in conversation