<?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 ods html file = compound name with macro variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36271#M4516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;My target is to put my everyday report to a certain folder, but the name of that html-file should include today-date - and here is some problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code is:&lt;/P&gt;&lt;P&gt;%let cur_date_4=%sysfunc(putn(%sysfunc(today()), DDMMYYN4.));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*%let report_name = %str(%')Sales report &amp;amp;cur_date_4.html%str(%');*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let report_name1=%str(Sales report);&lt;BR /&gt;%let report_name2=&amp;amp;cur_date_4;&lt;BR /&gt;%let report_name3=%str(.html);&lt;BR /&gt;%let reportname=%sysfunc(cat(&amp;amp;report_name1,&amp;amp;report_name2,&amp;amp;report_name3));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html path='C:\Users\U111\Documents\' file=&amp;amp;report_name style=minimal;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%my_report;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gives errors, and I don't know how to make it correct. Could anyone help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 15:21:54 GMT</pubDate>
    <dc:creator>need_some_help</dc:creator>
    <dc:date>2012-03-19T15:21:54Z</dc:date>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36271#M4516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;My target is to put my everyday report to a certain folder, but the name of that html-file should include today-date - and here is some problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code is:&lt;/P&gt;&lt;P&gt;%let cur_date_4=%sysfunc(putn(%sysfunc(today()), DDMMYYN4.));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*%let report_name = %str(%')Sales report &amp;amp;cur_date_4.html%str(%');*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let report_name1=%str(Sales report);&lt;BR /&gt;%let report_name2=&amp;amp;cur_date_4;&lt;BR /&gt;%let report_name3=%str(.html);&lt;BR /&gt;%let reportname=%sysfunc(cat(&amp;amp;report_name1,&amp;amp;report_name2,&amp;amp;report_name3));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html path='C:\Users\U111\Documents\' file=&amp;amp;report_name style=minimal;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%my_report;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gives errors, and I don't know how to make it correct. Could anyone help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 15:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36271#M4516</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-19T15:21:54Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36272#M4517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should not need to use the CAT function to concatenate macro variables.&amp;nbsp; Just reference them where you need them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let reportname=&amp;amp;report_name1.&amp;amp;report_name2.&amp;amp;report_name3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't the FILE= option on the ODS statement use a quoted string?&lt;/P&gt;&lt;P&gt;&amp;nbsp; file="&amp;amp;report_name" &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 16:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36272#M4517</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-03-19T16:02:54Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36273#M4518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what errors it gives, but I notice that you assigned the report name to &lt;EM&gt;reportname &lt;/EM&gt;but spelled the macro variable as &lt;EM&gt;report_name &lt;/EM&gt;in the ODS statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 16:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36273#M4518</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2012-03-19T16:03:40Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36274#M4519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry - when copied (by parts - because of useless comments), missed one string (--&amp;gt;):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let cur_date_4=%sysfunc(putn(%sysfunc(today()), DDMMYYN4.));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*%let report_name = %str(%')Sales report &amp;amp;cur_date_4.html%str(%');*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let report_name1=%str(Sales report);&lt;BR /&gt;%let report_name2=&amp;amp;cur_date_4;&lt;BR /&gt;%let report_name3=%str(.html);&lt;BR /&gt;%let reportname=%sysfunc(cat(&amp;amp;report_name1,&amp;amp;report_name2,&amp;amp;report_name3));&lt;/P&gt;&lt;P&gt;--&amp;gt; %let report_name = %str(%')&amp;amp;reportname%str(%');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html path='C:\Users\U111\Documents\' file=&amp;amp;report_name style=minimal;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%my_report;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this code gives such error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;16 ods html path='C:\Users\U111\Documents\' file=&amp;amp;report_name style=minimal;&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: DYNAMIC, INCLUDE, NO_BOTTOM_MATTER, NO_TOP_MATTER, TITLE, URL. &lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;_&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string. &lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;17 %my_report;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36274#M4519</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-20T14:01:34Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36275#M4520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some text displaying problems:&lt;/P&gt;&lt;P&gt;in first case 'style' is underlined, in second - 'ods' (the beginning of ods-string) is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36275#M4520</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-20T14:06:34Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36276#M4521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use double quotes on the line that is causing the error.&amp;nbsp; With single quotes the macro variable won't resolve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36276#M4521</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-03-20T14:15:32Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36277#M4522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - that method gave exactly the result I needed. Didn't met it (such joining macro variables - by '.') before... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36277#M4522</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-20T14:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36278#M4523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The periods don't join the variables. They assist SAS in telling where the variable name ends.&amp;nbsp; It is not strictly needed in this case.&lt;/P&gt;&lt;P&gt;I better example for when you need to insert the period is when you want to have static characters right after the expanded macro variable, but the static characters could be interpretted as part of the macro variable's name.&amp;nbsp; For example if you wanted to append _SORTED to the end of dataset name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let dsname=source;&lt;/P&gt;&lt;P&gt;proc sort data=&amp;amp;dsname out=&amp;amp;dsname._sorted; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the period SAS would look for macro variable named DSNAME_SORTED.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36278#M4523</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-03-20T14:36:17Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36279#M4524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've tried new way of applying to macro variables and then used double quotes - and it worked just like I wanted. Thanks!&lt;/P&gt;&lt;P&gt;Maybe you know where can I find documentation with description of simple macro variables using (like manipulating with char,number macro variables, right macro variables resolving) for SAS EG? Primarily I met some too advanced articles mostly for SAS (base)....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36279#M4524</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-20T14:39:40Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36280#M4525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Oh, now I've got it - '.' is just separator for SAS to read it right. Thanks for that remark - it's important)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 14:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36280#M4525</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-20T14:44:42Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36281#M4526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is a good place to start:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Also, if you search (Google) or go to support.sas.com and search or go to lexjansen.com and search for user group papers about using the SAS Macro facility, you should find a LOT of papers, tutorials and information about how the SAS Macro Facility works (including, but not limited to &lt;STRONG&gt;&amp;amp;macvar &lt;/STRONG&gt;references and &lt;STRONG&gt;%macpgm &lt;/STRONG&gt;invocations).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 15:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36281#M4526</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-21T15:59:13Z</dc:date>
    </item>
    <item>
      <title>ods html file = compound name with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36282#M4527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you, Cynthia! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 14:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ods-html-file-compound-name-with-macro-variable/m-p/36282#M4527</guid>
      <dc:creator>need_some_help</dc:creator>
      <dc:date>2012-03-22T14:42:53Z</dc:date>
    </item>
  </channel>
</rss>

