<?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 use macro to create new variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112142#M259094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Tom. Why I always forget about it.:smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Oct 2013 00:11:11 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2013-10-20T00:11:11Z</dc:date>
    <item>
      <title>How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112136#M259088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to macro.&amp;nbsp; Need some help to write my first macro.&amp;nbsp; I hope to deflate 100 variables in the table by a variable.&amp;nbsp; I wrote the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; text-decoration: underline; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;May I ask how to code such that the variable names will be automatically create according to a convention.&amp;nbsp; For example, I know different deflator.&amp;nbsp; The variable name is always &lt;STRONG&gt;original_viariable_name / deflator_name&lt;/STRONG&gt;.&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let vars = var1 var2 var3 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;vars._deflator = &amp;amp;vars / deflator;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope to get var1_deflator, var2_deflator, and var3_deflator, etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Oct 2013 23:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112136#M259088</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-13T23:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112137#M259089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are confusing macros and arrays / do loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do what you what you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array n(3) var1 var2 var3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array result(3) var1_deflator var2_deflator var3_deflator;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result(i) = n(i) / deflator ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on how your variables are named you might be able to streamline the coding of the 100 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 11:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112137#M259089</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-10-14T11:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112138#M259090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much!&amp;nbsp; It works -&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 04:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112138#M259090</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-16T04:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112139#M259091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code works, but I have to manually name each of the variables to be created.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I ask how to code such that the variable names will be automatically create according to a convention.&amp;nbsp; For example, I know different deflator.&amp;nbsp; The variable name is always original_viariable_name / deflator_name.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 22:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112139#M259091</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-19T22:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112140#M259092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need some tweak on Eric's code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select cats(name,'_deflator') into :newvar separated by ' ' from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK' AND MEMNAME='HAVE'; /*HAVE TO BE ALL CAPPED*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; select count(name) into :ct trimmed&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK' AND MEMNAME='HAVE'; /*HAVE TO BE ALL CAPPED*/&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array n(&amp;amp;ct.) var1--var3;/*from the first var to the last var, order matters and don't skip*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array result(&amp;amp;ct.) &amp;amp;newvar.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to &amp;amp;ct.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result(i) = n(i) / deflator ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 23:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112140#M259092</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-10-19T23:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112141#M259093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to run the query twice to count the number of values return. PROC SQL already puts that value into the automatic macro variable SQLOBS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2013 23:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112141#M259093</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-19T23:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112142#M259094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Tom. Why I always forget about it.:smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 00:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112142#M259094</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-10-20T00:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112143#M259095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Hai:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your awesome code.&amp;nbsp; It is reporting the following.&amp;nbsp; I think the reason is on my table, there are a few identifier variable (character variables) that cannot be divided.&amp;nbsp; My previous writing is kind of confusing.&amp;nbsp; All hope to achieve is that for SOME of the numeric variables in the table, I hope to divide them by a common variable called deflator.&amp;nbsp; The new variables' naming convention is OLD_VARIABLE_NAME__deflator.&amp;nbsp; The calculation would be like OLD_VARIABLE__deflator = OLD_VARIABLE / deflator ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could easily do this for one or two but when it is approaching hundreds, it is just too.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data r.funda2;&lt;/P&gt;&lt;P&gt;25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop i;&lt;/P&gt;&lt;P&gt;26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set r.funda1;&lt;/P&gt;&lt;P&gt;27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array n(&amp;amp;ct.) gvkey--fundaid;/*from the first var to the last var,&lt;/P&gt;&lt;P&gt;27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp; order matters and don't skip*/&lt;/P&gt;&lt;P&gt;NOTE: The array n has the same name as a SAS-supplied or user-defined &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function.&amp;nbsp; Parentheses following this name are treated as array &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; references and not function references.&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable CT resolves to 20&lt;/P&gt;&lt;P&gt;ERROR: fundaid does not follow gvkey on the list of previously defined &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variables.&lt;/P&gt;&lt;P&gt;ERROR: Too few variables defined for the dimension(s) specified for the array &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.&lt;/P&gt;&lt;P&gt;28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array result(&amp;amp;ct.) &amp;amp;newvar.;&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable CT resolves to 20&lt;/P&gt;&lt;P&gt;SYMBOLGEN:&amp;nbsp; Macro variable NEWVAR resolves to gvkey_AT datadate_AT fyear_AT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FYR_AT AT_AT CAPX_AT CEQ_AT CSHO_AT DVC_AT LT_AT NI_AT OANCF_AT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALE_AT XAD_AT XRD_AT SICH_AT prcc_f_AT endfyr_AT begfyr_AT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; funda_id_AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 07:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112143#M259095</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-20T07:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112144#M259096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like your real world is less friendly than the scenario you presented, which happens all the time &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;. &lt;/P&gt;&lt;P&gt;I would try following: &lt;/P&gt;&lt;P&gt; 1) rename the first array 'n' to something else, like '_n'. N() denotes a SAS internal function, so it may confuses SAS, as being reflected in the log.&lt;/P&gt;&lt;P&gt;2) Make sure all of the your array variables are numeric in this case.&lt;/P&gt;&lt;P&gt;3)Define 'SOME',&amp;nbsp; are they adjacent to each other? are there other rules?&amp;nbsp; maybe we can figure out a way to automate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 14:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112144#M259096</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-10-20T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112145#M259097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Build the list of new and old variable names at the same time and then use two parallel arrays. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; select name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , cats(name,'_deflator')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; into&amp;nbsp; :oldvars separated by ' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , :newvars separated by ' '&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; from dictionary.columns&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and MEMNAME='HAVE'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and upcase(name) ne 'DEFLATOR'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and type = 'num'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array _old &amp;amp;oldvars ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; array _new &amp;amp;newvars ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; do over _old ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _new = _old / deflator ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 15:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112145#M259097</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-20T15:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112146#M259098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OH YEAH!!!!!&amp;nbsp; IT WORKS!&amp;nbsp; I'm so happy.&amp;nbsp; Thank you so much, guys!&amp;nbsp; You are fabulous!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 07:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112146#M259098</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-22T07:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use macro to create new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112147#M259099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 07:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-macro-to-create-new-variables/m-p/112147#M259099</guid>
      <dc:creator>caveman529</dc:creator>
      <dc:date>2013-10-22T07:12:45Z</dc:date>
    </item>
  </channel>
</rss>

