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 (March 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 9 Mar 2011 11:57:59 -0800
Reply-To:   Sterling Paramore <gnilrets@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sterling Paramore <gnilrets@GMAIL.COM>
Subject:   Re: Checking for whitespace
In-Reply-To:   <OFBD0165BD.4BB5846E-ON8625784E.0069FC52-8625784E.006AB0B0@unmc.edu>
Content-Type:   text/plain; charset=ISO-8859-1

Thank you data _null_! It turns out that I had a carriage return at the end of the variable.

The strangest and most infuriating thing about this is that the source of the data was from an EG import of a spreadsheet and things have been working just fine for the past year. Then we upgraded to EG 4.3 and suddenly, for just this one spreadsheet, it started putting carriage returns at the end of the strings! Furthermore, if I recreate the import task in EG 4.3 (rather than using the one that was originally created in a 4.2 project), the carriage returns disappear!

Looks like I get to go back and recreate the import tasks for my 20+ spreadsheets in case this type of garbage is happening somewhere unnoticed. (BTW, I would love to abandon the need to use EG import tasks, but I still can't figure out a good way to read spreadsheets stored on a sharepoint or windows network with a UNIX SAS server).

Anyway, thanks for the help.

On Wed, Mar 9, 2011 at 11:25 AM, Robin R High <rhigh@unmc.edu> wrote:

> Sterling, > > I've had this situation numerous times when there are extra spaces in the > variable's value that don't appear in print, so can make the test by > adding a function to eliminate spaces around the variable name: > > data test; > set have; > isequal = (STRIP(ClaimLine_MajSvc) = "Phys"); > put ClaimLine_MajSvc isequal; > run; > > Robin High > UNMC > > > > > > > From: > Sterling Paramore <gnilrets@GMAIL.COM> > To: > SAS-L@LISTSERV.UGA.EDU > Date: > 03/09/2011 12:59 PM > Subject: > Checking for whitespace > Sent by: > "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> > > > > Dear SAS-L, > > I'm having some puzzling results occur when doing some character > comparisons > and I suspect the problem is with strange whitespace characters showing > up. > For example: > > data test; > set have; > > isequal = (ClaimLine_MajSvc = "Phys"); > put ClaimLine_MajSvc isequal; > > run; > > In log I see... > > > Phys 0 > Phys 0 > OP 0 > Phys 0 > Phys 0 > > > So I know that ClaimLine_MajSvc is Phys, but the evaluation is showing up > false! > > My question is, what's the best way to find out which whitespace character > is messing this up? > > Thanks, > Sterling > > > >


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