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 (January 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 12 Jan 2000 11:48:43 -0500
Reply-To:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:   Re: the first digit of the number
Comments:   To: "Primak, Philip" <Philip.Primak@GENZYME.COM>
Content-Type:   text/plain; charset="iso-8859-1"

From: Primak, Philip [mailto:Philip.Primak@GENZYME.COM] /I have to get the first digit of the number. /is there something more simple and elegant than

/ firstdgt=input(substr(scan(put(number,best8.),1),1,1),best8.);

FirstDgt is $char1. FirstDgt = substr(compress(put(Number,32.),1,1);

FirstDgt is numeric FirstDgt = input(substr(compress(put(Number,32.),1,1),1.);

Ron Fehd the string-processing maven CDC Atlanta Ga USA RJF2@cdc.gov


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