Date: Thu, 15 Jul 2010 15:56:52 +0000
Reply-To: "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject: Re: How to compress multiple decimal points
Content-Type: text/plain; charset="iso-8859-1"
1. I added a dataline with the value
to the program sample and could not reproduce the problem you described.
2. On followups to SAS-L threads, I'd recommend keeping SAS-L in the email list. SAS-L is never on vacation, but I occasionally am.
From: Brewer, David (brewerdi) [mailto:BREWERDI@ucmail.uc.edu]
Sent: Thursday, July 15, 2010 9:53 AM
To: Keintz, H. Mark
Subject: How to compress multiple decimal points
You replied to my SAS-L post about how to compress multiple decimal points on Thursday, July 8.
input text $;
put "Before " text= @;
if ix>0 then substr(text,ix+1)=compress(substr(text,ix+1),'.');
put @22 "After " text= ;
I just came across some data that is causing an "Invalid second argument to function SUBSTR". If you have a value with a comma in it, you will get the NOTE in the log; ex) ">20,000." (no quotes). If you omit the comma, the problem goes away.
Do you know why this is happening and how to solve the problem? Compressing the comma does not solve it.
Thanks again for your help.