<?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: I need a variable  in my output populated with 'y' if variable result is last.result but gettng in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514345#M138700</link>
    <description>&lt;P&gt;What is the error?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Nov 2018 06:21:40 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-11-19T06:21:40Z</dc:date>
    <item>
      <title>I need a variable  in my output populated with 'y' if variable result is last.result but gettng erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514343#M138698</link>
      <description>&lt;P&gt;data VS;&lt;BR /&gt;input ptid @5 vsdtc ddmmyy10. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/153152"&gt;@17&lt;/a&gt; result;&lt;BR /&gt;format vsdtc ddmmyy10.;&lt;BR /&gt;cards;&lt;BR /&gt;101 24/10/2018 110&lt;BR /&gt;101 25/10/2018 120&lt;BR /&gt;101 26/10/2018 115&lt;BR /&gt;101 27/10/2018 125&lt;BR /&gt;101 28/10/2018 135&lt;BR /&gt;102 23/10/2018 130&lt;BR /&gt;102 25/10/2018 120&lt;BR /&gt;102 26/10/2018 110&lt;BR /&gt;102 29/10/2018 115&lt;BR /&gt;102 30/10/2018 125&lt;BR /&gt;103 24/10/2018 120&lt;BR /&gt;103 26/10/2018 140&lt;BR /&gt;103 27/10/2018 110&lt;BR /&gt;103 28/10/2018 115&lt;BR /&gt;103 28/10/2018 145&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data DM;&lt;BR /&gt;input ptid @8 rfstdtc ddmmyy10.;&lt;BR /&gt;format rfstdtc ddmmyy10.;&lt;BR /&gt;cards;&lt;BR /&gt;101 26/10/2018&lt;BR /&gt;102 26/10/2018&lt;BR /&gt;103 27/10/2018&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=VS;&lt;BR /&gt;by ptid;&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=DM;&lt;BR /&gt;by ptid;&lt;BR /&gt;run;&lt;BR /&gt;data VS1;&lt;BR /&gt;merge VS DM;&lt;BR /&gt;by ptid;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;DATA VS2 VS3;&lt;BR /&gt;set VS1;&lt;BR /&gt;if vsdtc &amp;lt; rfstdtc then output VS2;&lt;BR /&gt;if vsdtc &amp;gt; rfstdtc then output VS3;&lt;BR /&gt;run;&lt;BR /&gt;DATA NEWL;&lt;BR /&gt;SET VS2;&lt;BR /&gt;IF LAST.result THEN vsblfl = 'Y';&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT;&lt;BR /&gt;RUN&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 06:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514343#M138698</guid>
      <dc:creator>Aliya-begum</dc:creator>
      <dc:date>2018-11-19T06:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514345#M138700</link>
      <description>&lt;P&gt;What is the error?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 06:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514345#M138700</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-19T06:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514346#M138701</link>
      <description>its showing variable last.result is uninitialized.</description>
      <pubDate>Mon, 19 Nov 2018 06:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514346#M138701</guid>
      <dc:creator>Aliya-begum</dc:creator>
      <dc:date>2018-11-19T06:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514354#M138707</link>
      <description>If you want to use last(or first you have to use by, too. And I am wondering that you don't get a warning or at least a note saying exactly that.</description>
      <pubDate>Mon, 19 Nov 2018 06:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514354#M138707</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-11-19T06:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514357#M138709</link>
      <description>ok&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514357#M138709</guid>
      <dc:creator>Aliya-begum</dc:creator>
      <dc:date>2018-11-19T07:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514376#M138717</link>
      <description>&lt;P&gt;Please avoid coding in upper case, its shouting code.&amp;nbsp; Missing by line:&lt;/P&gt;
&lt;PRE&gt;data newl; 
  set vs2;
  by result;
  if last.result then vsblfl='Y';
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Nov 2018 08:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514376#M138717</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-19T08:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: I need a variable  in my output populated with 'y' if variable result is last.result but gettng</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514424#M138733</link>
      <description>sure ill...and thanks for the reply</description>
      <pubDate>Mon, 19 Nov 2018 13:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-a-variable-in-my-output-populated-with-y-if-variable/m-p/514424#M138733</guid>
      <dc:creator>Aliya-begum</dc:creator>
      <dc:date>2018-11-19T13:28:24Z</dc:date>
    </item>
  </channel>
</rss>

