<?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: Using Array to Look Up Values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Array-to-Look-Up-Values/m-p/321095#M70809</link>
    <description>&lt;P&gt;Yes it is used, notice this is a temporary array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A temporary array is reading the dataset once and loading it into memory. Loading it into memory means the lookup can be faster than a standard merge. Merges require you sort both data sets, there's no sort required here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 25 Dec 2016 15:05:26 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-12-25T15:05:26Z</dc:date>
    <item>
      <title>Using Array to Look Up Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Array-to-Look-Up-Values/m-p/321087#M70808</link>
      <description>&lt;P&gt;Hello, I'm reading the advanced study guide and I got a question with regards to using multiple array to look up values. Below are the sample program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.lookup1;
 array Targets{1997:1999,12} _temporary_;
 if _n_=1 then do i= 1 to 3;
 set sasuser.ctargets;
 array mnth{*} Jan--Dec;
 do j=1 to dim(mnth);
 targets{year,j}=mnth{j};
 end;
 end;
 set sasuser.monthsum(keep=salemon revcargo monthno);
 year=input(substr(salemon,4),4.);
 Ctarget=targets{year,monthno};
 format ctarget dollar15.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Just curious, what's the advantage of using array over simply merging the data sets? It seems to be this technique isn't very useful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do people actually use this technique in practice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 14:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Array-to-Look-Up-Values/m-p/321087#M70808</guid>
      <dc:creator>kisumsam</dc:creator>
      <dc:date>2016-12-25T14:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Array to Look Up Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Array-to-Look-Up-Values/m-p/321095#M70809</link>
      <description>&lt;P&gt;Yes it is used, notice this is a temporary array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A temporary array is reading the dataset once and loading it into memory. Loading it into memory means the lookup can be faster than a standard merge. Merges require you sort both data sets, there's no sort required here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 15:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Array-to-Look-Up-Values/m-p/321095#M70809</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-25T15:05:26Z</dc:date>
    </item>
  </channel>
</rss>

