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 (July 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 6 Jul 2006 16:56:10 -0400
Reply-To:     Andrew Kramer <akramer@CERNER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andrew Kramer <akramer@CERNER.COM>
Subject:      Strip leading zeros

I inherited a file that has an undesirable format for the patient ID ("PTID"). In essence PTID was derived from a numeric variable and reformatted as $6. Unfortunately leading zeros were added to fill out the variable. I would like to strip away the leading zeros and leave the rest of the value. Here's some examples of what I'd like to do:

PTID newPTID 000012 12 020093 20093 004000 4000

I'm using version 9.1.3.

Thanks, Andrew Kramer

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