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 (May 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 1 May 2007 13:27:56 -0700
Reply-To:     MichelleZ <michelle_zunnurain@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         MichelleZ <michelle_zunnurain@HOTMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Cleaning ICD9 codes
Comments: To: sas-l@uga.edu
In-Reply-To:  <1178049878.018281.194260@y5g2000hsa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

On May 1, 3:04 pm, jofo <joey.fo...@gmail.com> wrote: > Hi All, > > I have some ICD9 codes that I would like to standardize before I > search through. > > Some have decimals, most do not. > > I would like to remove the decimal or space in place. > I tried this... > > data nodot; > set test; > array dx{8} $ dx1-dx8; > array dxcode{8}; > > do i=1 to 8; > if length(dx{i})then do; > dxcode{i} = prxchange('s/(?:(.+)((\.)|(\s))(\d+))/$1$3/',0, > dx{i}); > end; > end; > run; > > This fails miserably though. > > Anyone know of a way to remove a dot or space from the middle of the > code? > Anyone know if this is a bad idea and should be avoided? > > Thanks.

Try compress

data x; decimal='X123.456'; decimal2=compress(decimal,'.'); run;


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