<?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: condensation of data in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129220#M707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PG Thanks a lot! I've just changed the "lower than" to a "greater than" sign, and it works fine! Best regards from Germany EH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Nov 2012 14:19:06 GMT</pubDate>
    <dc:creator>Engel</dc:creator>
    <dc:date>2012-11-18T14:19:06Z</dc:date>
    <item>
      <title>condensation of data</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129218#M705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear SAS experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help with my data:&lt;/P&gt;&lt;P&gt;Here the detailed information:&lt;/P&gt;&lt;P&gt;My table is structured as follows:&lt;/P&gt;&lt;P&gt;I have 5 columns&lt;/P&gt;&lt;P&gt;1. Column serialNumber&lt;/P&gt;&lt;P&gt;2 Column: Name&lt;/P&gt;&lt;P&gt;3Rd column: First (time)&lt;/P&gt;&lt;P&gt;4Th column: Last (time)&lt;/P&gt;&lt;P&gt;5Th column: cycles (sec)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 3rd and 4th columns contain always the same time, the duration column always contains 1 (sec)&lt;/P&gt;&lt;P&gt;Now I would like to summarize the time, if the difference in time is less than 10 seconds between two rows.&lt;/P&gt;&lt;P&gt;The column "name" may change, and the summary should take place only within the respective name (I hope this is understandable)&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2722" alt="" class="jiveImage" src="https://communities.sas.com/legacyfs/online/2722_pastedImage_0.png" style="width: 1111px; height: 661px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can help me?&lt;/P&gt;&lt;P&gt;How can I handle it with SAS??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 15:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129218#M705</guid>
      <dc:creator>Engel</dc:creator>
      <dc:date>2012-11-17T15:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: condensation of data</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129219#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (untested):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data tmp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;set have; by serialNumber name notsorted;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;grp + (first.name or dif(last)&amp;lt;10);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;create table want as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;select serialNumber, name, min(first) as first, max(last) as last, max(last)-min(first)+1 as cycle&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;from tmp&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;group by serialNumber, name, grp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;drop table tmp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 17:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129219#M706</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-11-17T17:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: condensation of data</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129220#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PG Thanks a lot! I've just changed the "lower than" to a "greater than" sign, and it works fine! Best regards from Germany EH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2012 14:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/condensation-of-data/m-p/129220#M707</guid>
      <dc:creator>Engel</dc:creator>
      <dc:date>2012-11-18T14:19:06Z</dc:date>
    </item>
  </channel>
</rss>

