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 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 30 Jul 2008 11:50:15 -0700
Reply-To:     JohnH <john.c.hennessey@SSA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         JohnH <john.c.hennessey@SSA.GOV>
Organization: http://groups.google.com
Subject:      Re: One liner to convert numeric ssn to 9-digit character
              variable with leading zeros
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Jul 28, 9:56 am, "dirk.vk" <dirk...@gmail.com> wrote: > Hi John, how about the zx. format? > > I don't know much about these SocSecNr.s but from your post I gather > that you want to do this: > > * Imagine this is your data; > data SocNum; > input ssn; > cards; > 99882 > 555556888 > ; > run; > > * Using z9. will add leading zeroes; > data _null_; > set SocNum; > file 'C:\test.txt'; > put ssn z9.; > run; > > * Contents of test.txt: > 000099882 > 555556888 > ; > > Cheers, > Dirk

That's it! Thanks, John


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