Date: Mon, 28 Jul 2008 06:56:58 -0700
Reply-To: "dirk.vk" <dirk.vk@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "dirk.vk" <dirk.vk@GMAIL.COM>
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
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
|