<?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: ODS tagsets Error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187495#M265760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just checking on your original question there is also a missing Year() function to convert the SAS date in &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;amp;begperiod&lt;/SPAN&gt; to the year value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jan 2014 09:21:35 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2014-01-15T09:21:35Z</dc:date>
    <item>
      <title>ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187489#M265754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi, I keep getting an error message when I include references in the ods file statement. I would like to something similiar to the first ods tagsets file statement so that a report would be generated similiar to the second ods tagsets file name. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%LET begperiod = intnx('Year.4',intnx('Month',today(),-1,'E'),0,'B');&lt;BR /&gt;%LET endperiod = put(intnx('Month',today(),-1,'e'),monyy7.);&lt;/P&gt;&lt;P&gt;ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt&amp;amp;begperiod up to end of &amp;amp;endperiod.xls";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt2013 up to end of Dec2013.xls";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 14:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187489#M265754</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2014-01-03T14:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187490#M265755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post errors generated by code when asking questions related to errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 15:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187490#M265755</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-01-03T15:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187491#M265756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would not expect SAS functions to be resolved in an ods statement.&amp;nbsp; Instead use %sysfunc in the macro variable definitions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%LET begperiod = %sysfunc(intnx(Year.4, %sysfunc(intnx(Month, %sysfunc(today()),-1,E)),0,B));&lt;BR /&gt;%LET endperiod = %sysfunc(putN(%sysfunc(intnx(Month, %sysfunc(today()),-1,e)),monyy7.));&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt&amp;amp;begperiod up to end of &amp;amp;endperiod.xls";&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Alternately do the calculations in a data _Null_ step :&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data _Null_ ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; begperiod = intnx('Year.4',intnx('Month',today(),-1,'E'),0,'B');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endperiod = put(intnx('Month',today(),-1,'e'),monyy7.);&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call Symput ('&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;begperiod'&lt;/SPAN&gt;,&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;begperiod&lt;/SPAN&gt;) ;&amp;nbsp;&amp;nbsp; /*&amp;nbsp; leading spaces&amp;nbsp; */&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call Symput ('&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;endperiod&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;'&lt;/SPAN&gt;,&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;endperiod&lt;/SPAN&gt;) ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run ;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%Let &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;begperiod&lt;/SPAN&gt; = &amp;amp;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;begperiod&lt;/SPAN&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to manage trimming&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;The code is going to deliver a SAS date numeral for &amp;amp;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;begperiod&lt;/SPAN&gt; - is that what you want?&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;(Untested - check for missing or misplaced parentheses, use putn instead of put)&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Richard temporarily back in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 21:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187491#M265756</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-01-03T21:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187492#M265757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll also need periods after the end of the macro variables in the file= so the macro variables will resolve properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 23:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187492#M265757</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-03T23:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187493#M265758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried both of your suggestions. When I tried to use the %sysfunc in the macro variable definitions, I would get an error message indicating that one of the arguments is not a number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I tried your suggestion of doing the calculations in a data _Null_ step and Rezza suggestion of including periods after the end of the macro variables in the file= so the macro variables will resolve properly,&amp;nbsp; it worked fine. Thanks once again for your much appreciated help and suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 02:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187493#M265758</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2014-01-09T02:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187494#M265759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@twildone&lt;/P&gt;&lt;P&gt;Sorry about the lag in replying.&amp;nbsp; I do not know why you are getting the error you reported.&amp;nbsp; After adding the extra period in the one place, before the xls (Duh! thanks Reeza) and using a %Put before the ods statement for the purpose of demonstration this is what I got &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET begperiod = %sysfunc(intnx(Year.4, %sysfunc(intnx(Month,&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! %sysfunc(today()),-1,E)),0,B));&lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET endperiod = %sysfunc(putN(%sysfunc(intnx(Month, %sysfunc(today()),-1,e)),monyy7.));&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Put ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt&amp;amp;begperiod up to end of&lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! &amp;amp;endperiod..xls";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods tagsets.excelXP file="U:\2013-14 Income Reports\Incomerpt19449 up to end of DEC2013.xls"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Log from EG 5.1 with server SAS 9.3 - not that I would expect any different from an earlier version]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the Data _Null_ approach is perhaps the best way to go - easier to follow, easier to debug, no %sysfuncing!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in NZ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 09:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187494#M265759</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-01-15T09:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187495#M265760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just checking on your original question there is also a missing Year() function to convert the SAS date in &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;amp;begperiod&lt;/SPAN&gt; to the year value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 09:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagsets-Error/m-p/187495#M265760</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-01-15T09:21:35Z</dc:date>
    </item>
  </channel>
</rss>

