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 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 6 Jan 2010 11:48:45 -0800
Reply-To:     "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Subject:      Re: Leading Zeros
Comments: To: Raj <rajiv468@GMAIL.COM>
In-Reply-To:  <f2413dcb-921d-48d5-a512-27d33f9e4bee@a32g2000yqm.googlegroups.com>
Content-Type: text/plain; charset=windows-1252

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Raj > Sent: Wednesday, January 06, 2010 11:39 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Leading Zeros > > Hi, > > I have to read a CSV file. > In one column i have values of differrent length but the column length > is 5 now i want to keep leading zeros if the length of the value is > not 5. > > for example: > > A > > 1 > > 23 > > 55555 > > Ouput should be: > > A > > 00001 > > 00023 > > 55555 > > Could please help me with some suggestions. > > Thanks! > > Raj

Raj,

Output your data with a z5. Format.

Hope this is helpful,

Dan

Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204


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