<?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 Multiplying a character with Numeric in two datasets in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Multiplying-a-character-with-Numeric-in-two-datasets/m-p/47641#M12821</link>
    <description>i have two datasets one is in character in one table and other is in numeric in another dataset here is the example;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data x;&lt;BR /&gt;
input sal$ id$;&lt;BR /&gt;
cards;&lt;BR /&gt;
2 3&lt;BR /&gt;
6 7&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data y;&lt;BR /&gt;
input sal id;&lt;BR /&gt;
cards;&lt;BR /&gt;
89 78&lt;BR /&gt;
56 67&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Now i wnat a new data set to be created and i want the multiplication of x.sal and y.sal. and i want x.id*y.id;&lt;BR /&gt;
here is the out put...&lt;BR /&gt;
&lt;BR /&gt;
178  234&lt;BR /&gt;
336 467</description>
    <pubDate>Thu, 18 Sep 2008 08:58:29 GMT</pubDate>
    <dc:creator>R_Win</dc:creator>
    <dc:date>2008-09-18T08:58:29Z</dc:date>
    <item>
      <title>Multiplying a character with Numeric in two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Multiplying-a-character-with-Numeric-in-two-datasets/m-p/47641#M12821</link>
      <description>i have two datasets one is in character in one table and other is in numeric in another dataset here is the example;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data x;&lt;BR /&gt;
input sal$ id$;&lt;BR /&gt;
cards;&lt;BR /&gt;
2 3&lt;BR /&gt;
6 7&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data y;&lt;BR /&gt;
input sal id;&lt;BR /&gt;
cards;&lt;BR /&gt;
89 78&lt;BR /&gt;
56 67&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Now i wnat a new data set to be created and i want the multiplication of x.sal and y.sal. and i want x.id*y.id;&lt;BR /&gt;
here is the out put...&lt;BR /&gt;
&lt;BR /&gt;
178  234&lt;BR /&gt;
336 467</description>
      <pubDate>Thu, 18 Sep 2008 08:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Multiplying-a-character-with-Numeric-in-two-datasets/m-p/47641#M12821</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2008-09-18T08:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying a character with Numeric in two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Multiplying-a-character-with-Numeric-in-two-datasets/m-p/47642#M12822</link>
      <description>Well, you have to merge/join the table somehow. Do you want to match them based on  observation number...? Some kind of Id column generally is the best/common way to do it.&lt;BR /&gt;
&lt;BR /&gt;
About the multiplying part: you have to convert your character column to numeric first by using the input function:&lt;BR /&gt;
&lt;BR /&gt;
input(sal,best.)&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Thu, 18 Sep 2008 10:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Multiplying-a-character-with-Numeric-in-two-datasets/m-p/47642#M12822</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-09-18T10:48:54Z</dc:date>
    </item>
  </channel>
</rss>

