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 2004, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 31 Jan 2004 07:45:32 -0500
Reply-To:     "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject:      Re: removing leading characters?

"john mcmaster" <john.mcmaster@centraforce.fra> wrote in message news:psMSb.14386$ > I have a problem that I hope one of you knowledgable souls in here could > please help me with! > > I have a character variable called customer_account_id (length $12.) > values of which typically look as below: > > "000012345678" > "000001234567" > "000000123456" > "000000012345" > > How can i can i get rid of the prevaling zero characters from this variable? > > All replies greatly appreciated. > > Thanks. > > John >

Pretty vague: Do you have a character variable whose value includes double quotes ? Prevaling meaning leading zeroes (leading to those of us in the left to right world) ? Should the prevailing zeroes be removed or translated to spaces ? (if looking the zeroes would have been gotten rid of) Can ids contain embedded zeroes?

data foo; a="000012345678"; b=put(input(a,12.),12.-L); run;

-- Richard A. DeVenezia

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