<?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: help on coding in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119880#M33032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use the INDEXC() function or COUNTC() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if index(hist12, '1') then put 'Deliquent';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;numdel = countc(hist12,'1');&lt;/P&gt;&lt;P&gt;firstdel = index(hist12,'1') ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 16:52:45 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-06-26T16:52:45Z</dc:date>
    <item>
      <title>help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119875#M33027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This attribute, hist12, contains a 12-month history of delinquency. For example, 100000001000 indicates the most recent month and 9 months prior have delinquencies and all other months were current. I need to identify accounts with at least 1 delinquency in the last 12 months. What's the most efficient way to code it? I can use substr function to extract one byte at a time, but I would think there are better ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119875#M33027</guid>
      <dc:creator>otis</dc:creator>
      <dc:date>2013-06-26T16:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119876#M33028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't that anything greater than 000000000000, 12 0's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hist12&amp;gt;'000000000000' then ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119876#M33028</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-06-26T16:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119877#M33029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. That really helps. One thing I forgot to mention is that there is a value 'Z' represents inactivity. So it could look like: 10000zz00100. Your codes would include accounts with at least one delinquency in last 12 months or at least one inactivity ('Z') in last 12 months. How do I code it so I only have the first set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119877#M33029</guid>
      <dc:creator>otis</dc:creator>
      <dc:date>2013-06-26T16:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119878#M33030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;compress out the Z's....&lt;/P&gt;&lt;P&gt;Test is just to see the variable, you can delete that line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;test=input(compress(hist12, "z"), 12.);&lt;/P&gt;&lt;P&gt;if input(compress(hist12, "z"), 12.)&amp;gt;0 then flag=1;&lt;/P&gt;&lt;P&gt;else flag=0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119878#M33030</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-06-26T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119879#M33031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If using compress() as Reeza suggested, you can as well just do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;flag=lengthn(compress(a,'z0'))&amp;gt;0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119879#M33031</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-26T16:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119880#M33032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use the INDEXC() function or COUNTC() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if index(hist12, '1') then put 'Deliquent';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;numdel = countc(hist12,'1');&lt;/P&gt;&lt;P&gt;firstdel = index(hist12,'1') ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119880#M33032</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-06-26T16:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: help on coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119881#M33033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Appreciate all the suggestions. They all worked. The easiest way in my situation is to use countc or index. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 18:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-on-coding/m-p/119881#M33033</guid>
      <dc:creator>otis</dc:creator>
      <dc:date>2013-06-26T18:02:55Z</dc:date>
    </item>
  </channel>
</rss>

