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
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
|