<?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: using Call symputx in a macro function in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491242#M31673</link>
    <description>&lt;P&gt;There are other way to assign values to macro variables, if you are outside a data step. The two that come to mind are PROC SQL and %LET. Wouldn't one of those work for you?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 13:56:20 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-08-30T13:56:20Z</dc:date>
    <item>
      <title>using Call symputx in a macro function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491228#M31669</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to make a call symputx in a macro function without using a data step as below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &lt;STRONG&gt;&lt;I&gt;test&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%global&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Gflag;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _null_;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;call symputx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Gflag'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;test&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;Gflag;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 13:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491228#M31669</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-08-30T13:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: using Call symputx in a macro function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491233#M31670</link>
      <description>&lt;P&gt;As far as I know, call symputx can only be run in data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps if you could explain what you are doing and why you think you need it outside a data step, we could come up with a simple solution.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 13:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491233#M31670</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-30T13:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: using Call symputx in a macro function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491237#M31671</link>
      <description>&lt;P&gt;I just need to do a call symputx in a macro function and I wonder if there is another way to make that call outside of a data step to avoid those extra lines of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _NULL_;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;just a curiosity!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 13:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491237#M31671</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-08-30T13:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: using Call symputx in a macro function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491242#M31673</link>
      <description>&lt;P&gt;There are other way to assign values to macro variables, if you are outside a data step. The two that come to mind are PROC SQL and %LET. Wouldn't one of those work for you?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 13:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491242#M31673</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-30T13:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: using Call symputx in a macro function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491260#M31680</link>
      <description>&lt;P&gt;If you need global scope then:&lt;/P&gt;
&lt;PRE&gt;call symput('mvar',0,'g');&lt;/PRE&gt;
&lt;P&gt;The g means set as global.&amp;nbsp; However that being said its really not a good idea to be setting gloabl macro variables inside a macro - scoping, encapsulation etc.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 14:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-Call-symputx-in-a-macro-function/m-p/491260#M31680</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-30T14:28:11Z</dc:date>
    </item>
  </channel>
</rss>

