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 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Aug 2007 23:22:26 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>

On Thu, 23 Aug 2007 09:00:50 -0000, cat.. <cat.b41@GMAIL.COM> wrote:

>On Aug 22, 2:55 pm, gerhard.hellrie...@T-ONLINE.DE (Gerhard >Hellriegel) wrote: >> I don't understand that: in SAS there is only one type of numeric variable = >> "float binary" to say it in PL1 syntax. There are no integers in SAS. So >> searching a dot in the values makes no sense. > >It does, run this: > >data _null_; > format x 8.1; > x = 3; > y = index(x,'.'); > put y =; >run; > >Regards, > >Catherine

But try

data _null_; format x 8.1; do x = 3, -1234567890.123, 12345678901234567890; y = index(x,'.'); put x=best12. y =; end; run;

You should see

x=3 y=0 x=-1234567890 y=0 x=1.2345679E19 y=2

If you refine the technique by making the numeric-to-character conversion explicitly and using the BEST32 format, such errors should be extremely rare.

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