<?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: 2-in-1 program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507383#M136184</link>
    <description>&lt;P&gt;Guru&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;Thank you for the kind words. I wanted to write to you PM but let me take this opportunity to ask. Why isn't your book on safari online subscription. Of course I have a paid subscription. Other SAS gurus have got it there. Can you consider?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@Everybody my Kind apologies for deviation of the thread but i needed to clear my urge.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Oct 2018 02:54:36 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-10-25T02:54:36Z</dc:date>
    <item>
      <title>2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507376#M136177</link>
      <description>&lt;P&gt;Hello everyone, I couldn't come up with a&amp;nbsp;program that adjust dates (in duplicates: use start date from 1st record and use stop date from 2nd record) and remove duplicate records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input id $ startdate yyyymmdd. stopdate yyyymmdd. ;&lt;BR /&gt;datalines;&lt;BR /&gt;101 20150304 20190302&lt;BR /&gt;101 20190302 20160622&lt;BR /&gt;102 20150916 20190914&lt;BR /&gt;102 20190914 20161211&lt;BR /&gt;103 20060530 20070530&lt;BR /&gt;104 20070413 20071113&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output needed:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;101 20150304 20160622&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;102 20150916 20161211&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;103 20060530 20070530&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;104 20070413 20071113&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm tired of thinking and thanks a ton for solving my problem...&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 01:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507376#M136177</guid>
      <dc:creator>sasprogram2017</dc:creator>
      <dc:date>2018-10-25T01:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507377#M136178</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/150731"&gt;@sasprogram2017&lt;/a&gt;&amp;nbsp;are your records always sets of 2 or 1 for every id?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to SAS forum&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 02:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507377#M136178</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-25T02:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507378#M136179</link>
      <description>Thanks Novinosrin.&lt;BR /&gt;&lt;BR /&gt;No, not always sets of 2 for every ID, only when the start date &amp;gt; stop date. So I'm trying to combine the duplicates by taking the start date from first record and stop date from the duplicate record.&lt;BR /&gt;&lt;BR /&gt;Thanks again</description>
      <pubDate>Thu, 25 Oct 2018 02:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507378#M136179</guid>
      <dc:creator>sasprogram2017</dc:creator>
      <dc:date>2018-10-25T02:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507381#M136182</link>
      <description>&lt;P&gt;Sorry for the delay, does this help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input id $ startdate : yymmdd8.  stopdate : yymmdd8. ;
format startdate stopdate yymmdd10.;
datalines;
101 20150304 20190302
101 20190302 20160622
102 20150916 20190914
102 20190914 20161211
103 20060530 20070530
104 20070413 20071113
;

data want;
set test;
by id;
startdate=ifn( last.id and startdate&amp;gt;stopdate,lag(startdate),startdate);
if last.id ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Oct 2018 02:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507381#M136182</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-25T02:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507382#M136183</link>
      <description>&lt;P&gt;1. Always test the programs you provide to us. Your doesn't run as is.&lt;/P&gt;
&lt;P&gt;2. This works (but &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;'s solution is more efficient):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  merge HAVE 
        HAVE(firstobs=2 rename=(ID=NEXT_ID STARTDATE=NEXT_STARTDATE STOPDATE=NEXT_STOPDATE));
  if ID = lag(ID) then return;
  if ID=NEXT_ID then STOPDATE=NEXT_STOPDATE; &lt;BR /&gt;  output; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.WANT" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;ID&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;STARTDATE&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;STOPDATE&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;101&lt;/TD&gt;
&lt;TD class="r data"&gt;20150304&lt;/TD&gt;
&lt;TD class="r data"&gt;20160622&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;102&lt;/TD&gt;
&lt;TD class="r data"&gt;20150916&lt;/TD&gt;
&lt;TD class="r data"&gt;20161211&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;103&lt;/TD&gt;
&lt;TD class="r data"&gt;20060530&lt;/TD&gt;
&lt;TD class="r data"&gt;20070530&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;104&lt;/TD&gt;
&lt;TD class="r data"&gt;20070413&lt;/TD&gt;
&lt;TD class="r data"&gt;20071113&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 02:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507382#M136183</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-25T02:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507383#M136184</link>
      <description>&lt;P&gt;Guru&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;Thank you for the kind words. I wanted to write to you PM but let me take this opportunity to ask. Why isn't your book on safari online subscription. Of course I have a paid subscription. Other SAS gurus have got it there. Can you consider?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@Everybody my Kind apologies for deviation of the thread but i needed to clear my urge.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 02:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507383#M136184</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-10-25T02:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507394#M136192</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;Thank you! &lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://communities.sas.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;
&lt;P&gt;The third edition (200+ pages) is only a few weeks away, and this is a very relevant question as I&amp;nbsp;am pondering selling digital copies.&lt;/P&gt;
&lt;P&gt;I like paper and I want my technical books on a shelf in front of me, but I use and understand the appeal of a digital reader.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Publishing uses &lt;SPAN&gt;S&lt;/SPAN&gt;&lt;SPAN&gt;afari, so their books are there. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Since m&lt;/SPAN&gt;y book is not published by SAS (long story, not too sure what went wrong), it is not there automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I must admit never considering&lt;SPAN&gt;&amp;nbsp;Safari online, and this raises even more questions about enabling digital copies. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am not a fan of subscriptions myself, but as for paper, I see that the world seems to be moving this way.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We can continue this discussion offline and I'll quiz&amp;nbsp;you. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 01:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507394#M136192</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-26T01:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: 2-in-1 program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507452#M136222</link>
      <description>&lt;P&gt;Thanks so much N&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205" target="_blank"&gt;ovinosrin&lt;/A&gt;&amp;nbsp;and Chrisnz,&amp;nbsp;this is exactly what I needed.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 11:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-in-1-program/m-p/507452#M136222</guid>
      <dc:creator>sasprogram2017</dc:creator>
      <dc:date>2018-10-25T11:13:09Z</dc:date>
    </item>
  </channel>
</rss>

