Date: Thu, 1 May 2008 12:25:25 -0700
Reply-To: irinfigvam@yahoo.com
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Irin later <irinfigvam@YAHOO.COM>
Subject: Re: How to take out the part of the string ID? Need help.
In-Reply-To: <014501c8abbe$508616c0$832fa8c0@HP82083701405>
Content-Type: text/html; charset=us-ascii
<table cellspacing='0' cellpadding='0' border='0' ><tr><td style='font: inherit;'><P>Mary, it does work! Thank you so much!</P>
<P> </P>
<P>I just realized that I have one more problem. Woul you be so kind as to help me with that?</P>
<P> </P>
<P>I compare two files and it appears that id on the other side have longer name:</P>
<P> </P>
<P>Evangelina194511F</P>
<P> </P>
<P>How can I constract it in order to have just 5 letters of the name:</P>
<P> </P>
<P>Evang194511F</P>
<P> </P>
<P>Thank you for ALL YOUR HELP!</P>
<P> </P>
<P>Irin</P>
<P><BR><BR>--- On <B>Thu, 5/1/08, Mary <I><mlhoward@avalon.net></I></B> wrote:<BR></P>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Mary <mlhoward@avalon.net><BR>Subject: Re: How to take out the part of the string ID? Need help.<BR>To: irinfigvam@yahoo.com, SAS-L@LISTSERV.UGA.EDU<BR>Date: Thursday, May 1, 2008, 3:05 PM<BR><BR>
<DIV id=yiv1043470021>
<STYLE></STYLE>
<DIV><B><FONT face="Courier New" color=#000080 size=2>
<P>data</B> set1;</P>
<P></FONT><FONT face="Courier New" color=#0000ff size=2>informat</FONT><FONT face="Courier New" color=#000080 size=2> name </FONT><FONT face="Courier New" color=#008080 size=2>$200.</FONT><FONT face="Courier New" color=#000080 size=2>;</P>
<P></FONT><FONT face="Courier New" color=#0000ff size=2>infile</FONT><FONT face="Courier New" color=#000080 size=2> cards;</P>
<P></FONT><FONT face="Courier New" color=#0000ff size=2>input</FONT><FONT face="Courier New" color=#000080 size=2> name;</P>
<P>name=substr(name,</FONT><B><FONT face="Courier New" color=#008080 size=2>1</B></FONT><FONT face="Courier New" color=#000080 size=2>,lengthn(name)-</FONT><B><FONT face="Courier New" color=#008080 size=2>3</B></FONT><FONT face="Courier New" color=#000080 size=2>) || substr(name,lengthn(name),lengthn(name));</P></FONT><FONT face="Courier New" color=#0000ff size=2>
<P>cards</FONT><FONT face="Courier New" color=#000080 size=2>;</P></FONT><FONT face="Courier New" size=2>
<P>ADAM19480204M </P></FONT><FONT face="Courier New" color=#000080 size=2>
<P>;</P><B>
<P>run</B>;</P>
<P> </P>
<P><FONT face="Times New Roman" color=#000000 size=3>-Mary</FONT></P></FONT></DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A title=irinfigvam@YAHOO.COM href="mailto:irinfigvam@YAHOO.COM" target=_blank rel=nofollow>Irin later</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=SAS-L@LISTSERV.UGA.EDU href="mailto:SAS-L@LISTSERV.UGA.EDU" target=_blank rel=nofollow>SAS-L@LISTSERV.UGA.EDU</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 01, 2008 1:15 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> How to take out the part of the string ID? Need help.</DIV>
<DIV><BR></DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD>
<DIV id=yiv1904885829>
<P>I have newid for example </P>
<P> </P>
<P>ADAM19480204M (name+year+month+day+gender)</P>
<P> </P>
<P>I need to rebuild it in order it looks like:</P>
<P> </P>
<P>ADAM194802M (name+year+month+gender)</P>
<P>(Name can vary up to 5 letters)</P>
<P> </P>
<P>In other words I need to take out DAY part.</P>
<P> </P>
<P>Could you give me a hand ,please , with this code?</P>
<P> </P>
<P>Thank you in advance, Irin</P></DIV></TD></TR></TBODY></TABLE><BR>
<HR SIZE=1>
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ" target=_blank rel=nofollow>Try it now.</A></BLOCKQUOTE></DIV></BLOCKQUOTE></td></tr></table><br>
<hr size=1>Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a>
|