<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Moving the output to new variabble after '\' in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74683#M21686</link>
    <description>i have a variable in that observation there are \ after that it shd move to another variable&lt;BR /&gt;
&lt;BR /&gt;
data jl;&lt;BR /&gt;
input id;&lt;BR /&gt;
cards;&lt;BR /&gt;
16516\646465&lt;BR /&gt;
146416&lt;BR /&gt;
6546546\546205&lt;BR /&gt;
516884&lt;BR /&gt;
1654685\261656&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now i want the out put like this the observation after the \ shd be moved to another variable the output shd be&lt;BR /&gt;
&lt;BR /&gt;
   id             id2&lt;BR /&gt;
16516       646465&lt;BR /&gt;
146416&lt;BR /&gt;
6546546   546205&lt;BR /&gt;
516884&lt;BR /&gt;
1654685    261656</description>
    <pubDate>Thu, 19 Feb 2009 12:14:19 GMT</pubDate>
    <dc:creator>R_Win</dc:creator>
    <dc:date>2009-02-19T12:14:19Z</dc:date>
    <item>
      <title>Moving the output to new variabble after '\'</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74683#M21686</link>
      <description>i have a variable in that observation there are \ after that it shd move to another variable&lt;BR /&gt;
&lt;BR /&gt;
data jl;&lt;BR /&gt;
input id;&lt;BR /&gt;
cards;&lt;BR /&gt;
16516\646465&lt;BR /&gt;
146416&lt;BR /&gt;
6546546\546205&lt;BR /&gt;
516884&lt;BR /&gt;
1654685\261656&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now i want the out put like this the observation after the \ shd be moved to another variable the output shd be&lt;BR /&gt;
&lt;BR /&gt;
   id             id2&lt;BR /&gt;
16516       646465&lt;BR /&gt;
146416&lt;BR /&gt;
6546546   546205&lt;BR /&gt;
516884&lt;BR /&gt;
1654685    261656</description>
      <pubDate>Thu, 19 Feb 2009 12:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74683#M21686</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2009-02-19T12:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the output to new variabble after '\'</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74684#M21687</link>
      <description>Search on 'delimited input" you will find things such as &lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts673.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts673.html&lt;/A&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74684#M21687</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-02-19T12:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the output to new variabble after '\'</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74685#M21688</link>
      <description>You could do it this way:&lt;BR /&gt;
&lt;BR /&gt;
data dataset ;&lt;BR /&gt;
set jl ;&lt;BR /&gt;
if index(id,'\') then &lt;BR /&gt;
do ; &lt;BR /&gt;
		id2=substr(id,prxmatch("/\\/",id)+1,30) ; &lt;BR /&gt;
		id=substr(id,1,prxmatch("/\\/",id)-1) ; &lt;BR /&gt;
	end ;&lt;BR /&gt;
run ;</description>
      <pubDate>Thu, 19 Feb 2009 12:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74685#M21688</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-19T12:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the output to new variabble after '\'</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74686#M21689</link>
      <description>Simpler would be,&lt;BR /&gt;
&lt;BR /&gt;
data jl;&lt;BR /&gt;
input id $15. ;&lt;BR /&gt;
&lt;BR /&gt;
id1 = scan(id,1, '\');&lt;BR /&gt;
id2 = scan(id, 2, '\');&lt;BR /&gt;
id1n = input(id1, best.);&lt;BR /&gt;
id2n = input(id2, best.);&lt;BR /&gt;
cards;&lt;BR /&gt;
16516\646465&lt;BR /&gt;
146416&lt;BR /&gt;
6546546\546205&lt;BR /&gt;
516884&lt;BR /&gt;
1654685\261656&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 19 Feb 2009 13:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Moving-the-output-to-new-variabble-after/m-p/74686#M21689</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-02-19T13:03:48Z</dc:date>
    </item>
  </channel>
</rss>

