<?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: how do i get the following output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/579002#M164305</link>
    <description>&lt;P&gt;here it is not displaying screening and followup is shown twice. i want only followup start and end dates to be equal and for the rest end date must be the second value of start date&lt;/P&gt;</description>
    <pubDate>Sun, 04 Aug 2019 13:46:01 GMT</pubDate>
    <dc:creator>Mounika2</dc:creator>
    <dc:date>2019-08-04T13:46:01Z</dc:date>
    <item>
      <title>how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578990#M164297</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output-&lt;/P&gt;&lt;P&gt;pt&amp;nbsp; &amp;nbsp; &amp;nbsp;element&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Start_date&amp;nbsp; &amp;nbsp; &amp;nbsp; end_date&lt;/P&gt;&lt;P&gt;101 screening&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-10&amp;nbsp; &amp;nbsp;2017-02-12&lt;BR /&gt;102 randomization 2017-02-12&amp;nbsp; &amp;nbsp;2017-02-16&lt;BR /&gt;103 treatment&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-16&amp;nbsp; &amp;nbsp;2017-02 -18&lt;BR /&gt;104 followup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-18&amp;nbsp; &amp;nbsp;2017-02-18&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;data raw (rename= (visit= ELEMENT));&lt;BR /&gt;input pt visit$9. STDT: is8601da.;&lt;BR /&gt;format STDT is8601da.;&lt;BR /&gt;datalines;&lt;BR /&gt;101 screening&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-10&lt;BR /&gt;102 randomization 2017-02-12&lt;BR /&gt;103 treatment&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-16&lt;BR /&gt;104 followup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2017-02-18&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2019 12:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578990#M164297</guid>
      <dc:creator>Mounika2</dc:creator>
      <dc:date>2019-08-04T12:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578991#M164298</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data raw (rename= (visit= ELEMENT));
input pt visit :$13. STDT: is8601da.;
format STDT is8601da.;
datalines;
101 screening 2017-02-10
102 randomization 2017-02-12
103 treatment 2017-02-16
104 followup 2017-02-18
run;

data want;
   merge raw(rename=STDT=start_date) raw(firstobs=2 rename=STDT=end_date keep=STDT) end=lr;
   if lr then end_date=start_date;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Aug 2019 12:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578991#M164298</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-04T12:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578993#M164299</link>
      <description>What does end= lr mean&lt;BR /&gt;</description>
      <pubDate>Sun, 04 Aug 2019 12:57:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578993#M164299</guid>
      <dc:creator>Mounika2</dc:creator>
      <dc:date>2019-08-04T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578994#M164300</link>
      <description>&lt;P&gt;The end=lr option means that I create a temporary variable &lt;STRONG&gt;lr&amp;nbsp;&lt;/STRONG&gt;which is equal to 1 on the last observation of the data set and zero otherwise. I use this variable to set the appropriate end_date on the last observation, which should be the same as start_date as I see it. Does that make sense?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2019 13:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578994#M164300</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-04T13:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578995#M164301</link>
      <description>Yes.&lt;BR /&gt;Thank you &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 04 Aug 2019 13:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578995#M164301</guid>
      <dc:creator>Mounika2</dc:creator>
      <dc:date>2019-08-04T13:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578996#M164302</link>
      <description>&lt;P&gt;No problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Glad you found your answer.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2019 13:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/578996#M164302</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-04T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/579002#M164305</link>
      <description>&lt;P&gt;here it is not displaying screening and followup is shown twice. i want only followup start and end dates to be equal and for the rest end date must be the second value of start date&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2019 13:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/579002#M164305</guid>
      <dc:creator>Mounika2</dc:creator>
      <dc:date>2019-08-04T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get the following output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/579004#M164307</link>
      <description>&lt;P&gt;See my answer in your other thread&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2019 13:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-get-the-following-output/m-p/579004#M164307</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-04T13:47:52Z</dc:date>
    </item>
  </channel>
</rss>

