<?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: Looking for a SAS function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419838#M103261</link>
    <description>&lt;P&gt;is my understanding of your question correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data h;&lt;BR /&gt;input string :$80.;&lt;BR /&gt;cards;&lt;BR /&gt;1,3,5,3,7,2,&lt;BR /&gt;22,32,34,45,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data w;&lt;BR /&gt;set h;&lt;BR /&gt;k=count(string, ',');&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Dec 2017 18:54:08 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2017-12-09T18:54:08Z</dc:date>
    <item>
      <title>Looking for a SAS function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419837#M103260</link>
      <description>&lt;P&gt;Input string :$80.;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;1,3,5,3,7,2,&lt;/P&gt;
&lt;P&gt;22,32,34,45,&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a SAS function that tells me how many fields that I have on this line or how many commas I have on this line ?&lt;/P&gt;
&lt;P&gt;The first line the function would return 6, second line 4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp; Jim&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 18:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419837#M103260</guid>
      <dc:creator>Jim_G</dc:creator>
      <dc:date>2017-12-09T18:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a SAS function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419838#M103261</link>
      <description>&lt;P&gt;is my understanding of your question correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data h;&lt;BR /&gt;input string :$80.;&lt;BR /&gt;cards;&lt;BR /&gt;1,3,5,3,7,2,&lt;BR /&gt;22,32,34,45,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data w;&lt;BR /&gt;set h;&lt;BR /&gt;k=count(string, ',');&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 18:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419838#M103261</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-12-09T18:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a SAS function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419839#M103262</link>
      <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;</description>
      <pubDate>Sat, 09 Dec 2017 18:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419839#M103262</guid>
      <dc:creator>Jim_G</dc:creator>
      <dc:date>2017-12-09T18:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a SAS function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419842#M103264</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41031"&gt;@Jim_G&lt;/a&gt;: FWIW, you can also use the COUNTW function. That way, you will get the same answer regardless of whether the line does or doesn't end with a comma. e.g.:&lt;/P&gt;
&lt;PRE&gt;data h;
  input string :$80.;
  cards;
1,3,5,3,7,2,
22,32,34,45,
1,3,5,3,7,2
22,32,34,45
;

data w;
  set h;
  k=countw(string, ',','t');
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2017 19:37:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419842#M103264</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-12-09T19:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a SAS function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419844#M103265</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/306"&gt;@art&lt;/a&gt;</description>
      <pubDate>Sat, 09 Dec 2017 19:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-a-SAS-function/m-p/419844#M103265</guid>
      <dc:creator>Jim_G</dc:creator>
      <dc:date>2017-12-09T19:47:28Z</dc:date>
    </item>
  </channel>
</rss>

