<?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: Strange bug with week prompts in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244226#M17398</link>
    <description>&lt;P&gt;Wow. Looks like you discovered a bug. Happens here with EG 4.3 and 6.1, SAS 9.2 (AIX) as backend.&lt;/P&gt;
&lt;P&gt;This is a case for SAS TS, IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: the funny thing about this is that, while selecting the week and before hitting run, the correct dates are displayed.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jan 2016 14:48:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-01-18T14:48:02Z</dc:date>
    <item>
      <title>Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244218#M17397</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am hitting a slight bug with prompts in Enterprise guide 7.11 HF3 (7.100.1.2805).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;have built a reporting process for our users in EG where they select a week to report on in a prompt.&lt;/P&gt;
&lt;P&gt;The prompt is built as shown in the image below, as a date prompt where users enter a value with the date type set to week.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;IMG title="Prompt.jpg" alt="Prompt.jpg" src="https://communities.sas.com/t5/image/serverpage/image-id/1482i6B6EE2DA6B4C06E3/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the process using the prompt is run, enterprise guide sets some macro variables, prompt_1 and prompt_1_end as date9 format dates for the first and last date from the week selected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bug&amp;nbsp;I am getting is that, generally the dates selected will be Mon-Sun for the week selected &lt;STRONG&gt;except&lt;/STRONG&gt; for when week 1 of any year is selected where, the prompt examples show the correct dates but the actual values are Thu-Wed.&lt;/P&gt;
&lt;P&gt;This behaviour seems to be true for most years not just 2016.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Week53 2015 = 28DEC2015 - 03JAN2016&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Week01 2016 = 07JAN2016 - 13JAN2016&lt;/STRONG&gt; (should be 04JAN2016-10JAN2016)&lt;/P&gt;
&lt;P&gt;Week02 2016 = 11JAN2016 - 17JAN2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Screen shots of prompt selecting and log after running:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Prompt2.jpg" alt="Prompt2.jpg" src="https://communities.sas.com/t5/image/serverpage/image-id/1483i1CBD933B2353AA75/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Prompt3.jpg" alt="Prompt3.jpg" src="https://communities.sas.com/t5/image/serverpage/image-id/1484i16B69E1C58CE30A4/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone else come across this or found a solution?&lt;/P&gt;
&lt;P&gt;Obviously it won't be difficult to change my process to select a single date and then calculate the week required myself but if i can just fix EG it will probably be less work...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 14:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244218#M17397</guid>
      <dc:creator>TimCampbell</dc:creator>
      <dc:date>2016-01-18T14:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244226#M17398</link>
      <description>&lt;P&gt;Wow. Looks like you discovered a bug. Happens here with EG 4.3 and 6.1, SAS 9.2 (AIX) as backend.&lt;/P&gt;
&lt;P&gt;This is a case for SAS TS, IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: the funny thing about this is that, while selecting the week and before hitting run, the correct dates are displayed.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 14:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244226#M17398</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-18T14:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244372#M17399</link>
      <description>&lt;P&gt;Have raised with SAS TS as well, will post back if i hear anything from them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Added excitement is that the same thing happens if&amp;nbsp;I am running a stored process in enterprise guide, but not if i run it in the stored process web app.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 08:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244372#M17399</guid>
      <dc:creator>TimCampbell</dc:creator>
      <dc:date>2016-01-19T08:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244384#M17401</link>
      <description>&lt;P&gt;This seems to isolate EG as the culprit. Please keep us informed on further developments.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 09:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/244384#M17401</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-19T09:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/247165#M17530</link>
      <description>&lt;P&gt;Response back from SAS support is that they are going to be raising it with R&amp;amp;D to consider a hotfix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the time being&amp;nbsp;I have changed our reporting to use a normal date prompt&amp;nbsp;and then am calculating the appropriate week values and label from that with the code below in case anyone else comes across this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let g_date_prompt_start = %sysfunc(intnx(week1.2,%sysfunc(inputn(&amp;amp;g_date_prompt,date9.),8.),0,B),date9.);
%let g_date_prompt_end   = %sysfunc(intnx(week1.2,%sysfunc(inputn(&amp;amp;g_date_prompt,date9.),8.),0,E),date9.);
%let g_date_prompt_label = %sysfunc(tranwrd(%sysfunc(scan(%sysfunc(inputn(&amp;amp;g_date_prompt,date9.),weekv11.),2,-)),W,Week )) %sysfunc(scan(%sysfunc(inputn(&amp;amp;g_date_prompt,date9.),weekv11.),1,-));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Feb 2016 08:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/247165#M17530</guid>
      <dc:creator>TimCampbell</dc:creator>
      <dc:date>2016-02-01T08:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Strange bug with week prompts</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/247167#M17532</link>
      <description>&lt;P&gt;Congrats!&lt;/P&gt;
&lt;P&gt;Now you have a real SAS bug to your name.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 09:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Strange-bug-with-week-prompts/m-p/247167#M17532</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-01T09:08:39Z</dc:date>
    </item>
  </channel>
</rss>

