<?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: adding macro variable to filename in JOB in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/628580#M185777</link>
    <description>&lt;P&gt;Macro variables inside strings surrounded by single quotes are not resolved by the macro processor. So you need to hide the single quotes until the macro variables are resolved. to do this replace &lt;STRONG&gt;each&lt;/STRONG&gt; single quote with a macro quoted single quote: &lt;STRONG&gt;%STR(%')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For more information read the section about macro quoting in the Macro Language: Reference manual.&lt;/P&gt;</description>
    <pubDate>Sun, 01 Mar 2020 20:53:49 GMT</pubDate>
    <dc:creator>Cameron</dc:creator>
    <dc:date>2020-03-01T20:53:49Z</dc:date>
    <item>
      <title>adding macro variable to filename in JOB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/611144#M184990</link>
      <description>&lt;P&gt;In the VIYA environment, JobExectution to be exact,&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do you add a macro variable to a filename statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let VA_school_year=2019-20;&lt;/P&gt;&lt;P&gt;%let today='12/11/2019;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename xmlfile filesrvc parenturi="&amp;amp;SYS_JES_JOB_URI"&lt;BR /&gt;name='_webout.xml'&lt;BR /&gt;contenttype='application/vnd.ms-excel'&lt;BR /&gt;contentdisp='attachment; filename=&amp;amp;VA_school_year. MS Promo &amp;amp;today..xml';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.excelXP file=xmlfile options(sheet_name="Overall Schoolwide Progress" frozen_headers='1');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with double quotes like this:&amp;nbsp; ...fielname="&amp;amp;VA_school_year." MS Promo "&amp;amp;today.".xml'; ...&lt;/P&gt;&lt;P&gt;I have tried with no quotes, single quotes, with period and without period. When the file is produced the macro value is not substituted for the macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 20:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/611144#M184990</guid>
      <dc:creator>cuevasj</dc:creator>
      <dc:date>2019-12-11T20:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: adding macro variable to filename in JOB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/627079#M185022</link>
      <description>&lt;P&gt;1. What's that quote in&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;%let today='12/11/2019;&amp;nbsp;&lt;/FONT&gt; ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Like&lt;SPAN&gt;&amp;nbsp;this?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;contentdisp="attachment; filename=""&amp;amp;VA_school_year. MS Promo &amp;amp;today..xml"" ";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 02:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/627079#M185022</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-02-25T02:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: adding macro variable to filename in JOB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/628580#M185777</link>
      <description>&lt;P&gt;Macro variables inside strings surrounded by single quotes are not resolved by the macro processor. So you need to hide the single quotes until the macro variables are resolved. to do this replace &lt;STRONG&gt;each&lt;/STRONG&gt; single quote with a macro quoted single quote: &lt;STRONG&gt;%STR(%')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For more information read the section about macro quoting in the Macro Language: Reference manual.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Mar 2020 20:53:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-macro-variable-to-filename-in-JOB/m-p/628580#M185777</guid>
      <dc:creator>Cameron</dc:creator>
      <dc:date>2020-03-01T20:53:49Z</dc:date>
    </item>
  </channel>
</rss>

