<?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 symput with superq in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377006#M90509</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue trying to combine a call symput with a superq.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a PROC SQL INTO I create a macro variable cc which is something like&lt;/P&gt;&lt;PRE&gt;'1','5','13'&lt;/PRE&gt;&lt;P&gt;I want this macrovariable to be global and do this:&lt;/P&gt;&lt;PRE&gt;data _null_; call symput(cci,%superq(cc)); run;&lt;/PRE&gt;&lt;P&gt;But then I get this issue:&lt;/P&gt;&lt;PRE&gt;MPRINT(EXT):   data _null_;
MPRINT(EXT):   call symput(cci,'1','5','13');
MPRINT(EXT):   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
NOTE: Line generated by the macro function "SUPERQ".
163        '1','5','13'
           _
           386
           76

ERROR 386-185: Expecting an arithmetic expression.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/PRE&gt;&lt;P&gt;Do you know what's wrong here?&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 13:58:38 GMT</pubDate>
    <dc:creator>FP12</dc:creator>
    <dc:date>2017-07-18T13:58:38Z</dc:date>
    <item>
      <title>symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377006#M90509</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue trying to combine a call symput with a superq.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a PROC SQL INTO I create a macro variable cc which is something like&lt;/P&gt;&lt;PRE&gt;'1','5','13'&lt;/PRE&gt;&lt;P&gt;I want this macrovariable to be global and do this:&lt;/P&gt;&lt;PRE&gt;data _null_; call symput(cci,%superq(cc)); run;&lt;/PRE&gt;&lt;P&gt;But then I get this issue:&lt;/P&gt;&lt;PRE&gt;MPRINT(EXT):   data _null_;
MPRINT(EXT):   call symput(cci,'1','5','13');
MPRINT(EXT):   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
NOTE: Line generated by the macro function "SUPERQ".
163        '1','5','13'
           _
           386
           76

ERROR 386-185: Expecting an arithmetic expression.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/PRE&gt;&lt;P&gt;Do you know what's wrong here?&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377006#M90509</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2017-07-18T13:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377009#M90510</link>
      <description>&lt;P&gt;Why don't you do a simple&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global cc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;before you create cc in the SQL step?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377009#M90510</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-18T14:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377012#M90512</link>
      <description>&lt;P&gt;You can make it global by just using "%global your_macro_variable;," but this assumes it isn't global already. Are you creating it inside a macro and that is making it local?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377012#M90512</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-07-18T14:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377014#M90513</link>
      <description>&lt;P&gt;Well, you could do it:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  call symput('cci',"'1','5','13'");
run;
%put &amp;amp;cci.;&lt;/PRE&gt;
&lt;P&gt;The real question is why. &amp;nbsp;It is never a good idea to put quotes into a macro variable. &amp;nbsp;Second, it is rarely a good idea to put lists into a macro variable. &amp;nbsp;There are far better, simpler methods of working with data if you use Base SAS which is the programming language, rather than Macro which is a text generator.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377014#M90513</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-18T14:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377019#M90515</link>
      <description>&lt;P&gt;What is the actual question here?&lt;/P&gt;
&lt;P&gt;If you want to make a macro variable named CCI that has the quoted value of the macro varaible CC then you could just write.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global cci;
%let cci=%superq(cc);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to create CC as global and populate its value using SQL INTO clause then just define it as global before writing to it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
%global cc ;
select x into :cc separated by ',' ....&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377019#M90515</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-18T14:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: symput with superq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377022#M90516</link>
      <description>&lt;P&gt;Thanks to all for replies.&lt;/P&gt;&lt;P&gt;The easiest, the best.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't thik about this &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-with-superq/m-p/377022#M90516</guid>
      <dc:creator>FP12</dc:creator>
      <dc:date>2017-07-18T14:27:04Z</dc:date>
    </item>
  </channel>
</rss>

