<?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 Name output with macro variable components in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434947#M107992</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one small question. When naming an output with macro components in it, how do I end the macro component?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=Library.Data&amp;amp;datanumber Out=&lt;SPAN&gt;Library&lt;/SPAN&gt;.Data&amp;amp;datanumber_&amp;amp;mode&lt;FONT color="#000000"&gt;l&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;_partname&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My wanted output name would be: &lt;SPAN&gt;Library&lt;/SPAN&gt;.Data1_CA_para, where the macro variable "&amp;amp;" sign is for "CA" only, and I name the "para" myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log reports that the data name is fine, but the output name have some error, probably in the underscore and the partname. Any suggestions?&lt;BR /&gt;&lt;BR /&gt;Thank you very much in advance.&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>Wed, 07 Feb 2018 16:29:20 GMT</pubDate>
    <dc:creator>KrisDeng</dc:creator>
    <dc:date>2018-02-07T16:29:20Z</dc:date>
    <item>
      <title>Name output with macro variable components</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434947#M107992</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one small question. When naming an output with macro components in it, how do I end the macro component?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=Library.Data&amp;amp;datanumber Out=&lt;SPAN&gt;Library&lt;/SPAN&gt;.Data&amp;amp;datanumber_&amp;amp;mode&lt;FONT color="#000000"&gt;l&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;_partname&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My wanted output name would be: &lt;SPAN&gt;Library&lt;/SPAN&gt;.Data1_CA_para, where the macro variable "&amp;amp;" sign is for "CA" only, and I name the "para" myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log reports that the data name is fine, but the output name have some error, probably in the underscore and the partname. Any suggestions?&lt;BR /&gt;&lt;BR /&gt;Thank you very much in advance.&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>Wed, 07 Feb 2018 16:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434947#M107992</guid>
      <dc:creator>KrisDeng</dc:creator>
      <dc:date>2018-02-07T16:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Name output with macro variable components</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434949#M107993</link>
      <description>&lt;P&gt;If you're including a macro variable in the middle of text you need to use a period at the end so that SAS knows where the macro variable ends, otherwise it thinks the macro variable is longer than you have. See below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg data=Library.Data&amp;amp;datanumber. Out=Library.Data&amp;amp;datanumber._&amp;amp;model._partname;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/177650"&gt;@KrisDeng&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one small question. When naming an output with macro components in it, how do I end the macro component?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc reg data=Library.Data&amp;amp;datanumber Out=&lt;SPAN&gt;Library&lt;/SPAN&gt;.Data&amp;amp;datanumber_&amp;amp;mode&lt;FONT color="#000000"&gt;l&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;_partname&lt;/FONT&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My wanted output name would be: &lt;SPAN&gt;Library&lt;/SPAN&gt;.Data1_CA_para, where the macro variable "&amp;amp;" sign is for "CA" only, and I name the "para" myself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log reports that the data name is fine, but the output name have some error, probably in the underscore and the partname. Any suggestions?&lt;BR /&gt;&lt;BR /&gt;Thank you very much in advance.&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;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434949#M107993</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-07T16:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Name output with macro variable components</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434956#M107996</link>
      <description>Thank you very much for your reply. It worked.</description>
      <pubDate>Wed, 07 Feb 2018 16:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Name-output-with-macro-variable-components/m-p/434956#M107996</guid>
      <dc:creator>KrisDeng</dc:creator>
      <dc:date>2018-02-07T16:53:51Z</dc:date>
    </item>
  </channel>
</rss>

