Date: Tue, 18 Nov 2008 21:03:10 -0800
Reply-To: Suvi <svbsas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Suvi <svbsas@GMAIL.COM>
Organization: http://groups.google.com
Subject: Prefixing Zero to Numeric Variable
Content-Type: text/plain; charset=ISO-8859-1
Hi Friends,
I have a numeric varibale with defualt lenght( up to 8 digits) .In the
data set values will come in different lenghts..
Please look at the below example.
data Test;
input empid empname ;
cards;
3450 AAA
124859 BBB
10210 CCC
;
run;
Here i want to prefix 0 with the empid which is less then 8 digits.
Let us say for first obs it should be 00003450 , and second obs it
should be 00124859.
Here we can do this by applying Z8. format. but i dont want to apply
the format and i want to perfix zero as actual values.
Could you please help me to solve this?
Thanks & Regards
Suvi.