<?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: Macro naming via data set/report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148741#M29389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the&lt;/P&gt;&lt;P&gt;options ....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sets system options.&amp;nbsp; Some of these could change paper layout, papersize, where to output to etc.&amp;nbsp; The ones above are specifically for macro debugging.&amp;nbsp; They create a lot more detail in the log, for example showing what the macro variable actually is at the point the code is run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 13:31:09 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2014-09-17T13:31:09Z</dc:date>
    <item>
      <title>Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148736#M29384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prior to introducing the macro to this part of the code – each section would create an XML file based on the &lt;STRONG style="background: yellow;"&gt;sheet_name=’&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‘;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now that I’ve created a macro that reads each data set and performs the function for all eight datasets the naming isn’t working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps it’s something simple missing between the ‘&amp;nbsp;&amp;nbsp; ‘ – ex: ‘&amp;amp;&amp;amp;tb4’ right now it writes each tab for the output data as tb4, tb4 2, tb4 3, …… incrementing by 1 after the tb4.&lt;/P&gt;&lt;P&gt;I’m not sure – New Jack SAS Guy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;ODS&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; TAGSETS.EXCELXP &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;file&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'/windows/Infodata/DRountree/CAB/2014_2015_Competitive_Analysis_HMO_NYC.xml'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green;"&gt;*** Define macro3 ***;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; macro3(tb4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;ODS TAGSETS.EXCELXP options(sheet_interval=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'table'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; suppress_bylines=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'yes'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;STRONG style="background: yellow;"&gt;sheet_name= &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: purple; background: yellow; font-family: 'Courier New';"&gt;'&amp;amp;tb4'&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;PROC REPORT DATA = &amp;amp;tb4&amp;nbsp; spanrows nowd split=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'~'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;columns CategoryCode CategoryDescription ID_:;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;Define CategoryCode / order order=internal noprint; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;define CategoryDescription / order &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'Plan Name~Current Enrollment~Star Rating~Contract Number/PBP'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;define ID_: / display; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;compute after CategoryCode;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;line &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;endcomp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; macro3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green;"&gt;*** Run macro3 ***;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Aetna_14);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Empire_BCBS_14);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Healthfirst_14);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(UH_AARP_14);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Aetna_15);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Empire_BCBS_15);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(Healthfirst_15);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;%&lt;STRONG&gt;&lt;EM&gt;macro3&lt;/EM&gt;&lt;/STRONG&gt;(UH_AARP_15);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;ODS&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;_ALL_&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;CLOSE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148736#M29384</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2014-09-17T12:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148737#M29385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use double quotes sheet_name="tb4"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148737#M29385</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-09-17T12:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148738#M29386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two things, first you need to enclose macro variables in double quotes:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background: yellow;"&gt;sheet_name= "&lt;/STRONG&gt;&lt;STRONG style="background: yellow; color: purple; font-family: 'Courier New';"&gt;&amp;amp;tb4"&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Otherwise they will not resolve. &lt;/P&gt;&lt;P&gt;The second point is when testing macros ensure you use options mlogic mprint symbolgen; so that you can see what everything is doing in your log, it makes it a lot easier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148738#M29386</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-09-17T12:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148739#M29387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for the prompt reply....&lt;/P&gt;&lt;P&gt;Keep in mind I'm new to SAS - 1.7 years total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is options mlogic mprint symbolgen?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148739#M29387</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2014-09-17T12:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148740#M29388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading about it via Google - SAS.com - a little above my head but I understand why it's useful. &lt;/P&gt;&lt;P&gt;Since I'm new to this I write the SQL first and test the output to ensure data integrity then if needed create the macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148740#M29388</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2014-09-17T13:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Macro naming via data set/report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148741#M29389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the&lt;/P&gt;&lt;P&gt;options ....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sets system options.&amp;nbsp; Some of these could change paper layout, papersize, where to output to etc.&amp;nbsp; The ones above are specifically for macro debugging.&amp;nbsp; They create a lot more detail in the log, for example showing what the macro variable actually is at the point the code is run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-naming-via-data-set-report/m-p/148741#M29389</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-09-17T13:31:09Z</dc:date>
    </item>
  </channel>
</rss>

