|
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
|