<?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 help with if then statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23858#M3977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; to reduce to the most basic elements, and return a data set with indvid, and date at which "paid" passes 100, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Do&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;( last.indvid );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; claims1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; indvid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotPaid = sum( TotPaid, paid );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; totPaid GT &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; missing( pass100 ) &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;then &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;pass100 = yrmth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;End&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Keep&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; indvid pass100 totPaid yrmth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;Run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Oct 2011 22:18:26 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-10-09T22:18:26Z</dc:date>
    <item>
      <title>help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23853#M3972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The purpose of the code is to determine when (yrmth) a person reaches $100 in claims. In the sample data when the code processes the last row it goes into the "else" part but it has lost the total from the previous pass so I get total as missing (.). What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;claims1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;input&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;indvid paid yrmth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;datalines&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 50 201101&lt;/P&gt;&lt;P&gt;2 25 201102&lt;/P&gt;&lt;P&gt;2 85 201103&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;A&gt;&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc &lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;sort &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data=claims1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by indvid yrmth;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;data claims2 claimsmth1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set claims1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output claims2;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if indvid ne lag(indvid) then do;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t&lt;/SPAN&gt;otal=0;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;total=total+paid;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if total&amp;gt;=100 then output claimsmth1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total=total+paid;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;﻿&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if total&amp;gt;=100 then output claimsmth1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;run;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;I wasn't able to paste my code in here. It kept not pasting half the code so I had to type it. If there are any punctuation errors please disregard. The code does run.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;DanD&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 19:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23853#M3972</guid>
      <dc:creator>dan999</dc:creator>
      <dc:date>2011-10-04T19:54:58Z</dc:date>
    </item>
    <item>
      <title>help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23854#M3973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand why you want to output claims2 as it will merely be a copy of claims1.&amp;nbsp; What you were missing was a retain statement for total or, as I used below, a form that inherently retains the variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data claims1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input indvid paid yrmth;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;1 50 201101&lt;/P&gt;&lt;P&gt;2 25 201102&lt;/P&gt;&lt;P&gt;2 85 201103&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=claims1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by indvid yrmth;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data claims2 claimsmth1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set claims1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by indvid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output claims2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.indvid then total=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; total+paid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if total&amp;gt;=100 then output claimsmth1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 20:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23854#M3973</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-04T20:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23855#M3974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Since the dataset is sorted, using first.indvid and last.indvid is easier and cleaner than using lag().&lt;/P&gt;&lt;P&gt;2) the total variable needs to be retained across observations via "retain total;" or using the "a + b;" sum statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're probably looking for something like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;data claims2 claimsmth1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set claims1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by indvid yrmth;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output claims2;&lt;/STRONG&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt; &lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* replication of claims1 */&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.indvid then total = 0;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total = total + paid;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain total 0;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;/*&amp;nbsp; or you can use "total + paid;" which has an implied retain&amp;nbsp; */&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if total&amp;gt;=100 then output claimsmth1;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;STRONG style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 20:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23855#M3974</guid>
      <dc:creator>DLing</dc:creator>
      <dc:date>2011-10-04T20:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23856#M3975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the reply art. That is a much simpler solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DanD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 21:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23856#M3975</guid>
      <dc:creator>dan999</dc:creator>
      <dc:date>2011-10-04T21:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23857#M3976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the advice on using retain DLing. I'll try that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DanD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 21:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23857#M3976</guid>
      <dc:creator>dan999</dc:creator>
      <dc:date>2011-10-04T21:45:12Z</dc:date>
    </item>
    <item>
      <title>help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23858#M3977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; to reduce to the most basic elements, and return a data set with indvid, and date at which "paid" passes 100, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Do&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;( last.indvid );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; claims1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; indvid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TotPaid = sum( TotPaid, paid );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; totPaid GT &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; missing( pass100 ) &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;then &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;pass100 = yrmth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;End&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Keep&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; indvid pass100 totPaid yrmth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;Run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2011 22:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23858#M3977</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-10-09T22:18:26Z</dc:date>
    </item>
    <item>
      <title>help with if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23859#M3978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the alternative method Peter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DanD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 19:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-if-then-statement/m-p/23859#M3978</guid>
      <dc:creator>dan999</dc:creator>
      <dc:date>2011-10-10T19:47:01Z</dc:date>
    </item>
  </channel>
</rss>

