f



Re: Need to replace missing values with zeros in a varying number of rows and varying number of columns #3

People,
First -- sorry for not including data nor code.  I will in the future.  I am
learning alot about SAS and working with the folk on sas-l.  Everyone's
patience and help is appreicated
Second -- Howeard is correct.  I am working to implement the array and loop.
Thanks
Dave

-----Original Message-----
From: Howard Schreier [mailto:Howard_Schreier@ITA.DOC.GOV]
Sent: Friday, June 11, 2004 6:30 AM
To: SAS-L@LISTSERV.UGA.EDU
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
0
DavidF (141)
6/14/2004 6:04:26 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
411 Views

Similar Articles

[PageSpeed] 12

Reply: