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 (November 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 19 Nov 1999 15:56:31 GMT
Reply-To:     diltilia@MY-DEJA.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         diltilia@MY-DEJA.COM
Organization: Deja.com - Before you buy.
Subject:      Re: Simple problem - but urgent...

Drazen,

Try this: data x; set x; retain newvar ; if numvar ne . then newvar=numvar; else newvar=newvar; run;

OUTPUT: OBS NUMVAR NEWVAR

1 5 5 2 10 10 3 . 10 4 . 10 5 15 15 6 14 14 7 . 14 8 12 12

In article <813iso$1d5$1@as102.tel.hr>, "Drazen Orescanin" <drazen.orescanin@kaptol.hr> wrote: > Dear friends > > I have a table like this: > > OBS NUMVAR > 1 5 > 2 10 > 3 . > 4 . > 5 15 > 6 14 > 7 . > 8 12 > > I want to have a table like this: > > OBS NUMVAR > 1 5 > 2 10 > 3 10 > 4 10 > 5 15 > 6 14 > 7 14 > 8 12 > > In other words, I want to retain the value of NUMVAR only if NUMVAR is > missing. Is there any simple solution to this problem? > > Thanks > > Drazen from Croatia > > -- > I'm in favor of love as long as it doesn't happen when football is on > television... > >

Sent via Deja.com http://www.deja.com/ Before you buy.


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