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 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Jan 2002 15:47:36 -0500
Reply-To:     Francis Harvey <HARVEYF1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Francis Harvey <HARVEYF1@WESTAT.COM>
Subject:      Re: leading zeros in a character variable
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

Greetings Nancy,

Here is some sample code in case a numeric conversion is not feasible, HTH:

data _null_; length a $ 10; a = "afb"; if length(a) < 10 then a = repeat("0",9 - length(a)) || a; run;

Francis R. Harvey III WB303, x3952 harveyf1@westat.com

VB programmers know the wisdom of Nothing


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