<?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 do I multiply a variable by a number. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774730#M31240</link>
    <description>&lt;P&gt;This is what the log says. there is no output. Nothing happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 8327 observations read from the data set LAB.NUTRITION.&lt;BR /&gt;NOTE: The data set WORK.TRANSFORM has 8327 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Oct 2021 14:58:07 GMT</pubDate>
    <dc:creator>Bananas</dc:creator>
    <dc:date>2021-10-17T14:58:07Z</dc:date>
    <item>
      <title>How do I multiply a variable by a number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774726#M31238</link>
      <description>&lt;P&gt;I have a data set with about 5000 values. I have 5 categories. Say one of the categories is weight. I need to multiply every value in the weight column by 8. How would I put in the syntax for that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;data transform;&lt;BR /&gt;set lab.values;&lt;BR /&gt;weight2= weight*4;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;But nothing happens. can anyone help me please?&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 14:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774726#M31238</guid>
      <dc:creator>Bananas</dc:creator>
      <dc:date>2021-10-17T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I multiply a variable by a number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774729#M31239</link>
      <description>&lt;P&gt;First, look for errors or warnings in the log. (See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_self"&gt;Maxim 2&lt;/A&gt;) What do they say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean nothing happens? Please show us a portion of the output data set named TRANSFORM.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 14:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774729#M31239</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-17T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I multiply a variable by a number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774730#M31240</link>
      <description>&lt;P&gt;This is what the log says. there is no output. Nothing happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 8327 observations read from the data set LAB.NUTRITION.&lt;BR /&gt;NOTE: The data set WORK.TRANSFORM has 8327 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 14:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774730#M31240</guid>
      <dc:creator>Bananas</dc:creator>
      <dc:date>2021-10-17T14:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I multiply a variable by a number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774734#M31242</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;A DATA step program doesn't display anything but LOG messages. It looks like you successfully created WORK.TRANSFORM. If you want to look inside WORK.TRANSFORM, a handy procedure is PROC PRINT which should immediately come after the DATA step in your program. Or, you can find the data set listed in the library and open the data set or browse the data set using the table viewer. If you are using SAS Studio, you can just double click on the data set name in the library to view it. Otherwise try this:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc print data=work.transform(obs=10);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;This should display the first 10 rows in WORK.TRANSFORM. If you want to see all 8327 rows, then remove the (obs=10) from the PROC PRINT statement.&lt;BR /&gt;I am a bit confused though. If you want to multiply the original weight by the number 8, why does your code only multiply by the number 4???&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 15:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774734#M31242</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-10-17T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I multiply a variable by a number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774735#M31243</link>
      <description>&lt;P&gt;Hi Cynthia,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the proc print worked. Thank you. It says 4 because I was trying the same step on different categories.&amp;nbsp; One of the categories, I have to multiply by 4. Thank you again for your help.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 15:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-multiply-a-variable-by-a-number/m-p/774735#M31243</guid>
      <dc:creator>Bananas</dc:creator>
      <dc:date>2021-10-17T15:22:17Z</dc:date>
    </item>
  </channel>
</rss>

