<?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 one record in multiple records see below examples? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621386#M182671</link>
    <description>&lt;P&gt;i am having data like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;tid&amp;nbsp; &amp;nbsp; &amp;nbsp;tname$&amp;nbsp; &amp;nbsp;time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subt$&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; xy,zx,yz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want the above observation like this&lt;/P&gt;&lt;P&gt;tid&amp;nbsp; &amp;nbsp; &amp;nbsp;tname$&amp;nbsp; &amp;nbsp;time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subt$&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xy&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; zx&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only code required?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 07:58:09 GMT</pubDate>
    <dc:creator>Saikiran_Mamidi</dc:creator>
    <dc:date>2020-01-31T07:58:09Z</dc:date>
    <item>
      <title>one record in multiple records see below examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621386#M182671</link>
      <description>&lt;P&gt;i am having data like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;tid&amp;nbsp; &amp;nbsp; &amp;nbsp;tname$&amp;nbsp; &amp;nbsp;time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subt$&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; xy,zx,yz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want the above observation like this&lt;/P&gt;&lt;P&gt;tid&amp;nbsp; &amp;nbsp; &amp;nbsp;tname$&amp;nbsp; &amp;nbsp;time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subt$&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xy&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; zx&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;abc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20:12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only code required?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621386#M182671</guid>
      <dc:creator>Saikiran_Mamidi</dc:creator>
      <dc:date>2020-01-31T07:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: one record in multiple records see below examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621389#M182673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/304446"&gt;@Saikiran_Mamidi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an attempt to do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input tid  tname$ time:time5. subt:$80.;
	format time time5.;
	datalines;
1 abc 20:12 xy,zx,yz     
2 edf 20:12 aa,zx,yz,rb,rb
;
run;

proc sql noprint;
	select max(countw(subt,',')) into: max_nb from have;
quit;
	
data have2;
	set have;
	nb = countw(subt,',');
	array _subt(&amp;amp;max_nb) $ ;
	do i=1 to nb;
		subt_new = scan(subt,i,',');
		output;
	end;
	drop i nb subt _subt:;
	rename subt_new = subt;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 08:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621389#M182673</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-31T08:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: one record in multiple records see below examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621398#M182677</link>
      <description>&lt;P&gt;That's not so hard:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length _subt $2;
  do _N_=1 to countw(subt);
    _subt=scan(subt,_N_,',');
    output;
    end;
  drop subt;
  rename _subt=subt;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 09:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-record-in-multiple-records-see-below-examples/m-p/621398#M182677</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-01-31T09:53:20Z</dc:date>
    </item>
  </channel>
</rss>

