<?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 define the value of &amp;quot;Variable&amp;quot; based on proc macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630708#M186748</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to define the value of "&lt;CODE class=" language-sas"&gt;Variable_name" as "WC01201"&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro DatastreamVar(variable=);
data &amp;amp;variable.1(drop=AA AB AC AD Code NAME);
	length
	Type : $50.
	Variable_name :$100.
	;
	set &amp;amp;variable.;
	Variable_name=‘&amp;amp;variable.’;

	if _1990 = 'NA' then _1990 =.;
run;

%MEND DatastreamVar;
%DatastreamVar(variable=WC01201)
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;however, it shows as "&lt;CODE class=" language-sas"&gt;&amp;amp;variable.&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;" could you please give me some suggestions about this?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2020 18:39:37 GMT</pubDate>
    <dc:creator>Alexxxxxxx</dc:creator>
    <dc:date>2020-03-09T18:39:37Z</dc:date>
    <item>
      <title>define the value of "Variable" based on proc macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630708#M186748</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to define the value of "&lt;CODE class=" language-sas"&gt;Variable_name" as "WC01201"&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro DatastreamVar(variable=);
data &amp;amp;variable.1(drop=AA AB AC AD Code NAME);
	length
	Type : $50.
	Variable_name :$100.
	;
	set &amp;amp;variable.;
	Variable_name=‘&amp;amp;variable.’;

	if _1990 = 'NA' then _1990 =.;
run;

%MEND DatastreamVar;
%DatastreamVar(variable=WC01201)
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;however, it shows as "&lt;CODE class=" language-sas"&gt;&amp;amp;variable.&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;" could you please give me some suggestions about this?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 18:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630708#M186748</guid>
      <dc:creator>Alexxxxxxx</dc:creator>
      <dc:date>2020-03-09T18:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: define the value of "Variable" based on proc macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630711#M186750</link>
      <description>&lt;PRE&gt;Variable_name=‘&amp;amp;variable.’;&lt;/PRE&gt;
&lt;P&gt;This is incorrect. You must use double-quotes (and they can't be the "curly" quotes you show either, they must be straight double-quotes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Variable_name="&amp;amp;variable.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Mar 2020 18:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630711#M186750</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-09T18:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: define the value of "Variable" based on proc macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630712#M186751</link>
      <description>&lt;P&gt;The macro processor ignores text in strings quoted using single quotes on the outside. Use double quotes instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	Variable_name="&amp;amp;variable.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Mar 2020 18:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/define-the-value-of-quot-Variable-quot-based-on-proc-macro/m-p/630712#M186751</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-09T18:50:16Z</dc:date>
    </item>
  </channel>
</rss>

