<?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 xl theam in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/xl-theam-in-sas/m-p/127389#M26017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to develop a code in SAS Macros like a XL (formulas) can i get any sample code or example ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2012 05:08:10 GMT</pubDate>
    <dc:creator>Grandhi4</dc:creator>
    <dc:date>2012-05-28T05:08:10Z</dc:date>
    <item>
      <title>xl theam in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xl-theam-in-sas/m-p/127389#M26017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to develop a code in SAS Macros like a XL (formulas) can i get any sample code or example ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 05:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xl-theam-in-sas/m-p/127389#M26017</guid>
      <dc:creator>Grandhi4</dc:creator>
      <dc:date>2012-05-28T05:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: xl theam in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xl-theam-in-sas/m-p/127390#M26018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; An Excel formula is different from a SAS Macro program. For example, if you build a formula in Excel for a new column (D) based on multiplying the value in column B by the value in column C, you might have a formula like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum(b2*c2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then you might copy that formula down the entire column D (see excel formula part of the screenshot) in order to populate the whole column with values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But in SAS, if column B represented VALUE and column C represented DISCOUNT and column D represented DISCVAL (final discount value), then you would calculate DISCVAL this way (in a longer program shown in screenshot):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DISCVAL=VALUE * DISCOUNT;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm not sure you really need a SAS Macro program. It might be overkill to use a SAS macro program to create a new variable, if that's all you wanted/needed to do. I wonder whether it might be better to read about basic SAS concepts, like DATA step processing and how to write a SAS program. SAS is not a WYSIWYG application (what you see is what you get), like Excel or Word. You can't manipulate SAS variables in the same way that you can manipulate values in a worksheet. A SAS macro program does not operate the same way than an Excel macro operates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; To effectively use SAS macro programs and macro variables, you really need to understand the basics of using SAS, because the first "rule" of macro is to have a working SAS program. Here's a good paper on the basics of DATA step programming:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nesug.org/proceedings/nesug08/ff/ff12.pdf" title="http://www.nesug.org/proceedings/nesug08/ff/ff12.pdf"&gt;http://www.nesug.org/proceedings/nesug08/ff/ff12.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/269-29.pdf" title="http://www2.sas.com/proceedings/sugi29/269-29.pdf"&gt;http://www2.sas.com/proceedings/sugi29/269-29.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/246-31.pdf" title="http://www2.sas.com/proceedings/sugi31/246-31.pdf"&gt;http://www2.sas.com/proceedings/sugi31/246-31.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the documentation has some good sections:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#p1bidsfinjj8w4n1ih918jkj5yh0.htm" title="http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#p1bidsfinjj8w4n1ih918jkj5yh0.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#p1bidsfinjj8w4n1ih918jkj5yh0.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#n14v4oo5h1p5r0n1ayunekh2ba7i.htm" title="http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#n14v4oo5h1p5r0n1ayunekh2ba7i.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62753/HTML/default/viewer.htm#n14v4oo5h1p5r0n1ayunekh2ba7i.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, for overview information about SAS Macro processing, this is a good paper:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" title="http://www2.sas.com/proceedings/sugi28/056-28.pdf"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11516i5D148B71947C9237/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="excel_formula.png" title="excel_formula.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 14:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xl-theam-in-sas/m-p/127390#M26018</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-05-28T14:50:41Z</dc:date>
    </item>
  </channel>
</rss>

