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 (August 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 4 Aug 2006 09:11:10 -0400
Reply-To:   Kevin Roland Viel <kviel@EMORY.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Kevin Roland Viel <kviel@EMORY.EDU>
Subject:   Re: Solaris and INFILE
In-Reply-To:   <BAY103-F250381D375A74B8C85C28FB0500@phx.gbl>
Content-Type:   TEXT/PLAIN; charset=US-ASCII

On Thu, 3 Aug 2006, David L Cassell wrote:

> kviel@EMORY.EDU wrote: > >Greetings, > > > > I have same puzzling failures. I have a file on my Solaris box with the > >following line: > > > > H2r Std. Error: > > > > > >I have tried several lines to recognize this point in the file: > > > >if left( _infile_ ) =: "H2r" ; > >if scan( compress( _infile_ ) , 1 , "." ) = "H2rStd" ; > > > >Does anyone have a clue? I am lost? I was wondering about changinge the > >ENCODING options, but that does not seem to be right. > > > >TIA, > > > >Kevin > > > > Assuming there are unseen characters at the start of each line > (which might happen if you have transferred a PC file without > converting the newline to a unix newline), then you could try > the following bit of Perlery: > > if prxmatch('/^\W*H2r/',_infile_); > > If you don't have SAS 9.1, you will need to separate out the regex > and put it in a PRXPARSE() function. > > The regex is as follows: > > ^ start of string > \W* zero or more non-word characters > H2R the letters H 2 r in sequence > > The \W* will match blanks, tabs, unprintable characters, and other > debris. In fact, \W will match everything except [a-zA-Z0-9_].

David and Mark,

Thanks. I *used* to FTP the file from the Unix system to Windows and process it from there. I never experienced this problem. Yes, INDEX() worked, but I could decipher why the other versions did not. I spent two minutes trying to get the Unix programs more, vi, vim, and nedit to display nonprinting characters, with success. I asked and was told that file is just a plain ASCII file....

I did revert to perl:

if ( /\s*H2r Std/ ){}

Kind regards,

Kevin

Kevin Viel PhD Candidate Department of Epidemiology Rollins School of Public Health Emory University Atlanta, GA 30322


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