<?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: How to multiple variables from two different datasets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733212#M228494</link>
    <description>thank you so much!</description>
    <pubDate>Tue, 13 Apr 2021 05:47:16 GMT</pubDate>
    <dc:creator>igsteo</dc:creator>
    <dc:date>2021-04-13T05:47:16Z</dc:date>
    <item>
      <title>How to multiple variables from two different datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733192#M228484</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variables in totalmktcap: mktcap16--mktcap20&lt;/P&gt;&lt;P&gt;Variables in decme2_all: stock me16--me20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the weightage of every stock per year i.e. from 2016 to 2020. However, that means dividing values from two different data sets. I need help to code this. It would be much appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you everyone!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 08:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733192#M228484</guid>
      <dc:creator>igsteo</dc:creator>
      <dc:date>2021-04-14T08:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiple variables from two different datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733195#M228487</link>
      <description>&lt;P&gt;The response will vary depending on what kind of calculation you want to do.&lt;BR /&gt;rename, merge, or...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you give us a specific calculation using the variable name?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 03:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733195#M228487</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-04-13T03:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiple variables from two different datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733196#M228488</link>
      <description>Example:&lt;BR /&gt;mktweight16=m16/mktcap16&lt;BR /&gt;by stock&lt;BR /&gt;&lt;BR /&gt;i will carry this out for data from 2016 - 2020</description>
      <pubDate>Tue, 13 Apr 2021 03:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733196#M228488</guid>
      <dc:creator>igsteo</dc:creator>
      <dc:date>2021-04-13T03:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiple variables from two different datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733202#M228490</link>
      <description>&lt;P&gt;Try this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table have as
    select * from totalmktcap, decme2_all;
  ;
quit;

data want;
  set have;
  array mw{*} mktweight16-mktweight20;
  array me{*} me16-me20;
  array mk{*} mktcap16-mktcap20;
  do i=1 to dim(mw);
    mw{i}=me{i}/mk{i};
  end;
  drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't have the data set, so I haven't tested it yet.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 04:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733202#M228490</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-04-13T04:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiple variables from two different datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733212#M228494</link>
      <description>thank you so much!</description>
      <pubDate>Tue, 13 Apr 2021 05:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-multiple-variables-from-two-different-datasets/m-p/733212#M228494</guid>
      <dc:creator>igsteo</dc:creator>
      <dc:date>2021-04-13T05:47:16Z</dc:date>
    </item>
  </channel>
</rss>

