<?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: Arrays in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345967#M79679</link>
    <description>&lt;P&gt;Arrays are not part of the solution.&amp;nbsp; Arrays always refer to a single observation at a time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a way to get what you are asking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;if _n_=1 then first_x = x;&lt;/P&gt;
&lt;P&gt;retain first_x;&lt;/P&gt;
&lt;P&gt;z = first_x * y;&lt;/P&gt;
&lt;P&gt;drop first_x;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 21:08:36 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-03-30T21:08:36Z</dc:date>
    <item>
      <title>Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345960#M79674</link>
      <description>&lt;P&gt;How can I access only one value of a column in array or suppose&lt;/P&gt;&lt;P&gt;X &amp;nbsp;Y&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;3 &amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 14px;"&gt;6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;&amp;nbsp;I need output as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;X Y &amp;nbsp;Z&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;2 &amp;nbsp;1 &amp;nbsp;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;2 &amp;nbsp;5 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;3 &amp;nbsp;6 &amp;nbsp;12&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;Multiplying value 1 of x with all values of y&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px;"&gt;How it is done using array&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 20:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345960#M79674</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-03-30T20:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345966#M79678</link>
      <description>&lt;P&gt;That wouldn't use an array at all. Arrays are short cut references to variables and work only on a single row.&lt;/P&gt;
&lt;P&gt;A SAS data step loops through all rows implicitly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want_mult;
set have;

Z = x * y;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I misunderstood your question so this answer is incorrect, but I'm leaving it rather than deleting since it's already out there.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 21:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345966#M79678</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-30T21:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345967#M79679</link>
      <description>&lt;P&gt;Arrays are not part of the solution.&amp;nbsp; Arrays always refer to a single observation at a time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a way to get what you are asking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;if _n_=1 then first_x = x;&lt;/P&gt;
&lt;P&gt;retain first_x;&lt;/P&gt;
&lt;P&gt;z = first_x * y;&lt;/P&gt;
&lt;P&gt;drop first_x;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 21:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/345967#M79679</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-30T21:08:36Z</dc:date>
    </item>
  </channel>
</rss>

