Date: Thu, 1 May 2008 14:05:23 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: How to take out the part of the string ID? Need help.
Content-Type: text/plain; charset="iso-8859-1"
data set1;
informat name $200.;
infile cards;
input name;
name=substr(name,1,lengthn(name)-3) || substr(name,lengthn(name),lengthn(name));
cards;
ADAM19480204M
;
run;
-Mary
----- Original Message -----
From: Irin later
To: SAS-L@LISTSERV.UGA.EDU
Sent: Thursday, May 01, 2008 1:15 PM
Subject: How to take out the part of the string ID? Need help.
I have newid for example
ADAM19480204M (name+year+month+day+gender)
I need to rebuild it in order it looks like:
ADAM194802M (name+year+month+gender)
(Name can vary up to 5 letters)
In other words I need to take out DAY part.
Could you give me a hand ,please , with this code?
Thank you in advance, Irin
------------------------------------------------------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.