<?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 create names for multiple htms using SAS macro in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354239#M18470</link>
    <description>&lt;P&gt;I would like to name the title of a html output using a sas macro that will run with a do loop for multiple iterations in SAS 9.4:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current code is %macro test (st,xst1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %mend test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; followed by, e.g., %test ('CA',CA15);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset where the table (in HTML format) will be output has the following where statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where statefip IN (&amp;amp;st);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a year variable where there are observations with '15 values. Is there a way that I can draw this information out as a macro variable to apply for all files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am confused about the logic behind "xst1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any comments and suggestions!&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2017 18:56:49 GMT</pubDate>
    <dc:creator>tipscode</dc:creator>
    <dc:date>2017-04-27T18:56:49Z</dc:date>
    <item>
      <title>create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354239#M18470</link>
      <description>&lt;P&gt;I would like to name the title of a html output using a sas macro that will run with a do loop for multiple iterations in SAS 9.4:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current code is %macro test (st,xst1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %mend test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; followed by, e.g., %test ('CA',CA15);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset where the table (in HTML format) will be output has the following where statement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where statefip IN (&amp;amp;st);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a year variable where there are observations with '15 values. Is there a way that I can draw this information out as a macro variable to apply for all files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am confused about the logic behind "xst1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any comments and suggestions!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 18:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354239#M18470</guid>
      <dc:creator>tipscode</dc:creator>
      <dc:date>2017-04-27T18:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354256#M18471</link>
      <description>&lt;P&gt;It sounds like you need more experience with macro language, to figure out what it is doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look through your macro, with these guidelines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Any time you see &amp;amp;ST (or &amp;amp;st) picture it as being replaced by the 4 characters 'CA'&lt;/LI&gt;
&lt;LI&gt;Any time&amp;nbsp; you see &amp;amp;XST1 (or &amp;amp;xst1) picture it as being replaced by the 4 characters CA15&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Whatever SAS program results from those text substitutions, that is the program that is running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously, there is more to macro language than this.&amp;nbsp; But that's a good starting point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 19:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354256#M18471</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-27T19:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354260#M18472</link>
      <description>&lt;P&gt;Thank you! Follow-up question: Does single quotes or double quotes matter for 'CA'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been going through past articles from Art Carpenter and think that his macro reference would help for this and other tasks. Are there any other references that I can read up on?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 19:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354260#M18472</guid>
      <dc:creator>tipscode</dc:creator>
      <dc:date>2017-04-27T19:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354262#M18473</link>
      <description>&lt;P&gt;Single vs. double quotes in 'CA' probably make no difference.&amp;nbsp; It depends on what the SAS statement looks like after substituting those 4 characters for &amp;amp;ST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a general rule, single vs. double quotes make a big difference when referring to a macro variable.&amp;nbsp; Single quotes suppress all macro activity.&amp;nbsp; So:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&amp;amp;xst1" will resolve and become "CA15"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'&amp;amp;xst1' will not resolve and will remain '&amp;amp;xst1'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are dozens of papers out there on macro language.&amp;nbsp; Art's book is good, but&amp;nbsp;you can get started today with a little searching without having to wait for a book to arrive.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 19:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354262#M18473</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-27T19:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354451#M18474</link>
      <description>Here's a paper to get you started: &lt;A href="https://support.sas.com/resources/papers/proceedings13/120-2013.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings13/120-2013.pdf&lt;/A&gt; and also &lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt; .&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Apr 2017 12:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354451#M18474</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-04-28T12:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: create names for multiple htms using SAS macro</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354558#M18478</link>
      <description>&lt;P&gt;Thank you Cynthia.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 17:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-names-for-multiple-htms-using-SAS-macro/m-p/354558#M18478</guid>
      <dc:creator>tipscode</dc:creator>
      <dc:date>2017-04-28T17:54:04Z</dc:date>
    </item>
  </channel>
</rss>

