<?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 a macro variable containing special character build with &amp;quot;into :&amp;quot; keyword in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424468#M281015</link>
    <description>&lt;P&gt;You can use the NLITERAL function here.&amp;nbsp; I also simplify by using DICTIONARY.COLUMNS, but you can do the same in the PROC CONTENTS output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
	select nliteral(name)
      into :mylist separated by ' ' 
      from dictionary.columns
      where  memname='IMPORT' and type='char'
	;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Jan 2018 22:15:17 GMT</pubDate>
    <dc:creator>snoopy369</dc:creator>
    <dc:date>2018-01-02T22:15:17Z</dc:date>
    <item>
      <title>Using a macro variable containing special character build with "into :" keyword</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424466#M281014</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data import;
	infile datalines;
	input id "var-1"n $ "var'g"n $ "var % of"n;
datalines;
1 d e 23
2 f g 34
3 g k 45
;;;;


proc contents data=import noprint varnum out=varlist ;

proc sql noprint;
	select name into :mylist separated by ' ' from varlist where type = 2;

proc freq data=import;
	tables &amp;amp;mylist.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The question is easy. How can i make this code works ? The problems are the special character inside the mylist macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 22:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424466#M281014</guid>
      <dc:creator>arjunascagnetto</dc:creator>
      <dc:date>2018-01-02T22:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro variable containing special character build with "into :" keyword</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424468#M281015</link>
      <description>&lt;P&gt;You can use the NLITERAL function here.&amp;nbsp; I also simplify by using DICTIONARY.COLUMNS, but you can do the same in the PROC CONTENTS output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
	select nliteral(name)
      into :mylist separated by ' ' 
      from dictionary.columns
      where  memname='IMPORT' and type='char'
	;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jan 2018 22:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424468#M281015</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2018-01-02T22:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro variable containing special character build with "into :" keyword</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424493#M281016</link>
      <description>&lt;P&gt;Why make life hard for yourself by defining variable names containing special characters? If there is no real business need for them then it is a lot easier just to use "standard" variable names. Remember you can define labels for SAS variables that contain special characters if they are required for reporting.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 02:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424493#M281016</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-03T02:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro variable containing special character build with "into :" keyword</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424524#M281018</link>
      <description>of course this is a simplificatin of a real problem OF COURSE!</description>
      <pubDate>Wed, 03 Jan 2018 09:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424524#M281018</guid>
      <dc:creator>arjunascagnetto</dc:creator>
      <dc:date>2018-01-03T09:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro variable containing special character build with "into :" keyword</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424675#M281020</link>
      <description>&lt;P&gt;Perhaps if you explained the real problem, we could offer advice on that.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-a-macro-variable-containing-special-character-build-with/m-p/424675#M281020</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-03T19:07:26Z</dc:date>
    </item>
  </channel>
</rss>

