<?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 Array code in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148469#M39271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could some one suggest an array code for the structure below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN1 OUT1 IN2 OUT2 IN3 OUT3 IN4 OUT4 &lt;SPAN style="color: #ff0000;"&gt;DTMIN1 DTMOUT1 UNIT1 &lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #ff00ff;"&gt;DTMIN2 DTMOUT2 UNIT2&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #00ffff;"&gt;DTMIN3 DTMOUT3 UNIT3&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;DTMIN4 DTMOUT4 UNIT4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is one record per ID&lt;/P&gt;&lt;P&gt;IN(n) and OUT(n) is a pair....the time a patient is ON and OFF the ventilator&lt;/P&gt;&lt;P&gt;DTMIN(n) and DTMOUT(n) is also a pair-the time a person came into a department and goes out of the department(unit)...&lt;/P&gt;&lt;P&gt;we are looking to see which department/unit he was in, at the time when he was on the ventilator&lt;/P&gt;&lt;P&gt;.if the condition satisfies we need to grab that DTMIN(n) , DTMOUT(n) and the UNIT(n)........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)first check if IN1 or OUT1 of the pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN2 or OUT2 of the pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN3 or OUT3 of pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN4 or OUT4 pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Mar 2014 06:09:15 GMT</pubDate>
    <dc:creator>robertrao</dc:creator>
    <dc:date>2014-03-19T06:09:15Z</dc:date>
    <item>
      <title>Array code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148469#M39271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could some one suggest an array code for the structure below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN1 OUT1 IN2 OUT2 IN3 OUT3 IN4 OUT4 &lt;SPAN style="color: #ff0000;"&gt;DTMIN1 DTMOUT1 UNIT1 &lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #ff00ff;"&gt;DTMIN2 DTMOUT2 UNIT2&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #00ffff;"&gt;DTMIN3 DTMOUT3 UNIT3&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;DTMIN4 DTMOUT4 UNIT4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is one record per ID&lt;/P&gt;&lt;P&gt;IN(n) and OUT(n) is a pair....the time a patient is ON and OFF the ventilator&lt;/P&gt;&lt;P&gt;DTMIN(n) and DTMOUT(n) is also a pair-the time a person came into a department and goes out of the department(unit)...&lt;/P&gt;&lt;P&gt;we are looking to see which department/unit he was in, at the time when he was on the ventilator&lt;/P&gt;&lt;P&gt;.if the condition satisfies we need to grab that DTMIN(n) , DTMOUT(n) and the UNIT(n)........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)first check if IN1 or OUT1 of the pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN2 or OUT2 of the pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN3 or OUT3 of pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;2)next check if IN4 or OUT4 pair falls with in any of the 5 DTMIN-DTMOUT pairs. If it falls then grab that information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 06:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148469#M39271</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-03-19T06:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Array code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148470#M39272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First build the logic for a single in/out and dtmin/dtmout pair. Once you have that working create 2 arrays for these pairs and iterate through all the combinations using 2 nested loops (so check every single in/out pair against all the dtmin/dtmout pairs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy to provide some code for this if you provide a data step creating some sample data for all these variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 08:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148470#M39272</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-03-19T08:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Array code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148471#M39273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp; array in{4} (...);&lt;/P&gt;&lt;P&gt;&amp;nbsp; array out{4} (...);&lt;/P&gt;&lt;P&gt;&amp;nbsp; array dtmin{5} (...);&lt;/P&gt;&lt;P&gt;&amp;nbsp; array dtmax{5} (...);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do z=1 to 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dtmin{z} &amp;lt;= in{i} &amp;lt;= dtmax{z}) or (dtmin{z} &amp;lt;= out{i} &amp;lt;= dtmax{z}) then flag="Y";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 10:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-code/m-p/148471#M39273</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-03-19T10:19:24Z</dc:date>
    </item>
  </channel>
</rss>

