LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 11 Jun 2004 09:29:58 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: Need to replace missing values with zeros in a varying number
              of rows and varying number of columns

It's a little hard to be sure without seeing sample data, but it seems to me that David does not want all missing values converted to zero, but only those corresponding to the current and previous dates.

Suppose there are three days. On the first day, expected progress occurs. On the second day, failure to progress. On the third day, catchup and completion. So the dataset looks like

C b b C b b C C C

where "C" represents completion "b" a blank. My sense is that David wants

C b b C 0 b C C C

rather than

C 0 0 C 0 0 C C C

I suggest using an array and a loop, with the termination of the loop computed in terms of the "current" day.

On Tue, 8 Jun 2004 08:24:15 -0700, Terjeson, Mark <TERJEM@DSHS.WA.GOV> wrote:

>Hi David, > >This handy option helps. > > >option missing=0; > >data test; > a = .; > b = 1; >run; > > >Hope this is helpful, >Mark Terjeson >Reporting, Analysis, and Procurement Section >Information Services Division >Department of Social and Health Services >State of Washington >mailto:terjem@dshs.wa.gov > > > > > >-----Original Message----- >From: David Fickbohm [mailto:DavidF@HOMEGAIN.COM] >Sent: Tuesday, June 08, 2004 8:13 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Need to replace missing values with zeros in a varying number of >rows and varying number of columns > >People, >I am working in PC SAS v8.1 > >I have a program that finds the number of times a varying number of people >get a document to different levels of completeness. The program displays >this information from the beginning of the current month to the current day. >Using a separate column for each day. So as the month continues the number >of days(columns) increases. If person A does not get a document to level 2 >completeness on a certain day the field currently is blank. The user would >like the report to display zeros instead of blanks. I create the report in >SAS and then export the final report to the user in Excel. > >Can someone please point me in the right direction on changing all of the >missing values (.) to zeroes ? > >Thanks > >Dave > >Dave Fickbohm >Data Mining Analyst >Homegain+ >2450 45th St. >Emeryville, CA, 94608 >Phone 510 655 0800 ext 4151


Back to: Top of message | Previous page | Main SAS-L page