<?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: Counting symbol or split field? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45916#M12145</link>
    <description>Have a look at the COUNT function.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
count words site:sas.com</description>
    <pubDate>Thu, 08 Jul 2010 22:32:30 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-07-08T22:32:30Z</dc:date>
    <item>
      <title>Counting symbol or split field?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45915#M12144</link>
      <description>I am trying to get a count of comorbidities for each patient.  I have a variable that is a list of comorbidities seperated by commas.  Is there a way to count the commas in the field?  Or would you advise splitting them into multiple variables?  The most anyone has is 11 comorbidities.  &lt;BR /&gt;
&lt;BR /&gt;
Sample:&lt;BR /&gt;
Sleep apnea,Lichen planus,IBS,RAD,Multinodular thyroid,Actinic keratosis,Neuropathy</description>
      <pubDate>Thu, 08 Jul 2010 21:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45915#M12144</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-08T21:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counting symbol or split field?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45916#M12145</link>
      <description>Have a look at the COUNT function.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
count words site:sas.com</description>
      <pubDate>Thu, 08 Jul 2010 22:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45916#M12145</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-08T22:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Counting symbol or split field?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45917#M12146</link>
      <description>Vanessa,&lt;BR /&gt;
&lt;BR /&gt;
If there is a chance that some records don't have any comorbidities, you could do something like the following:&lt;BR /&gt;
&lt;BR /&gt;
data have;&lt;BR /&gt;
  informat comorbidities $255.;&lt;BR /&gt;
  infile cards truncover;&lt;BR /&gt;
  input comorbidities &amp;amp;;&lt;BR /&gt;
  i=1;&lt;BR /&gt;
  count=0;&lt;BR /&gt;
  do while (not(missing(scan(comorbidities,i,','))));&lt;BR /&gt;
    i+1;&lt;BR /&gt;
    count+1;&lt;BR /&gt;
  end;&lt;BR /&gt;
  cards;&lt;BR /&gt;
Sleep apnea,Lichen planus,IBS,RAD,Multinodular thyroid,Actinic keratosis,Neuropathy &lt;BR /&gt;
Sleep apnea,Lichen planus,IBS&lt;BR /&gt;
  &lt;BR /&gt;
test&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art</description>
      <pubDate>Sat, 10 Jul 2010 22:05:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Counting-symbol-or-split-field/m-p/45917#M12146</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2010-07-10T22:05:30Z</dc:date>
    </item>
  </channel>
</rss>

