<?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 Re: observation separated by comma. How to convert in rows. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158178#M30887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the COUNTW function with a ',' delimiter to determine the number of occurences in a line. Then run a do loop for 1 to (result of COUNTW), use the SCAN function with delimiter ',' to get the nth value group, split that with another use of the SCAN function with default delimiter ' ', and output. KEEP only the wanted variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2014 08:11:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-03-27T08:11:21Z</dc:date>
    <item>
      <title>observation separated by comma. How to convert in rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158177#M30886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have multiple records in one observation separated by comma. how to convert in rows. EXAMPLE; data test; input name $50 id $200; datalines; A WE123-45, GYHJK-01, LLLLL-13, GGGGG-01 B AAAAA-50 BBBBB-03 ; RUN; WANT OUTPUT LIKE: A WE123-45 A GYHJK-01 A LLLLL-13 A GGGGG-01 B AAAAA-50 B BBBBB-03 please suggest!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 07:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158177#M30886</guid>
      <dc:creator>P_Sharma</dc:creator>
      <dc:date>2014-03-27T07:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: observation separated by comma. How to convert in rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158178#M30887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the COUNTW function with a ',' delimiter to determine the number of occurences in a line. Then run a do loop for 1 to (result of COUNTW), use the SCAN function with delimiter ',' to get the nth value group, split that with another use of the SCAN function with default delimiter ' ', and output. KEEP only the wanted variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 08:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158178#M30887</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-03-27T08:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: observation separated by comma. How to convert in rows.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158179#M30888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; test(drop=obs);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; cards &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; obs :&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: teal; font-size: 10pt;"&gt;$1000.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;id=scan(obs,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;name=scan(obs,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; id= name=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;A WE123-45,A GYHJK-01,A LLLLL-13,A GGGGG-01,B AAAAA-50,B BBBBB-03&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;id=A name=WE123-45&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=A name=GYHJK-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=A name=LLLLL-13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=A name=GGGGG-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=B name=AAAAA-50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=B name=BBBBB-03&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 08:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/observation-separated-by-comma-How-to-convert-in-rows/m-p/158179#M30888</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-03-27T08:53:03Z</dc:date>
    </item>
  </channel>
</rss>

