<?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: Array problem? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/264792#M51991</link>
    <description>&lt;P&gt;Thank you Loko and noted. Will go through the documentation and explore more on the lag function. Thanks again! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2016 14:43:01 GMT</pubDate>
    <dc:creator>rush_milo</dc:creator>
    <dc:date>2016-04-19T14:43:01Z</dc:date>
    <item>
      <title>Array problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263265#M51510</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2705i6FF2FE3A684EB903/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="exclusion.jpg" title="exclusion.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the image attached above, really appreciate if someone can guide&amp;nbsp;me&amp;nbsp;on&amp;nbsp;how to get the &lt;STRONG&gt;exclusion&lt;/STRONG&gt; figures in the yellow box. Does it require the usage of array programming?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm stuck on writing the code for the exclusion calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data summ(drop= t1 t2 t3 t4);&lt;/P&gt;
&lt;P&gt;set w1;&lt;/P&gt;
&lt;P&gt;base = coalesce(t1,t2,t3,t4);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/** stuck here for exclusion calculation **/&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone's help will be greatly appreciated! Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 16:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263265#M51510</guid>
      <dc:creator>rush_milo</dc:creator>
      <dc:date>2016-04-12T16:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263272#M51513</link>
      <description>&lt;P&gt;Here are a couple of statements you could add to the DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;exclusion = - dif(base);&lt;/P&gt;
&lt;P&gt;if _n_ = 1 then exclusion = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 17:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263272#M51513</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-04-12T17:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263279#M51518</link>
      <description>&lt;P&gt;Hi Astounding,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your prompt reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have just started using SAS a few months back. Thank you for introducing me to the DIF function. Have never used this before. Can't wait to try this at work tomorrow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, many thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 17:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263279#M51518</guid>
      <dc:creator>rush_milo</dc:creator>
      <dc:date>2016-04-12T17:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263414#M51549</link>
      <description>&lt;P&gt;From the same category there also is &lt;STRONG&gt;lag &lt;/STRONG&gt;function. Of course carefulness shall be paid when using this function and reading the documention might a good start:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212547.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212547.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input item t1 t2 t3 t4 ;&lt;BR /&gt;datalines;&lt;BR /&gt;1 700 . . .&lt;BR /&gt;2 . 650 . .&lt;BR /&gt;3 . . 630 .&lt;BR /&gt;4 . . . 620&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;&lt;BR /&gt;base = coalesce(t1,t2,t3,t4);&lt;BR /&gt;base_prec=lag(base);&lt;BR /&gt;exclusion=ifn(base_prec,base_prec-base,0);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 07:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/263414#M51549</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-04-13T07:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/264792#M51991</link>
      <description>&lt;P&gt;Thank you Loko and noted. Will go through the documentation and explore more on the lag function. Thanks again! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2016 14:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/264792#M51991</guid>
      <dc:creator>rush_milo</dc:creator>
      <dc:date>2016-04-19T14:43:01Z</dc:date>
    </item>
  </channel>
</rss>

