BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TimCampbell
Quartz | Level 8

Hi all,

 

I am hitting a slight bug with prompts in Enterprise guide 7.11 HF3 (7.100.1.2805).

 

I have built a reporting process for our users in EG where they select a week to report on in a prompt.

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.

 Prompt.jpg

 

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.

 

The bug I am getting is that, generally the dates selected will be Mon-Sun for the week selected except for when week 1 of any year is selected where, the prompt examples show the correct dates but the actual values are Thu-Wed.

This behaviour seems to be true for most years not just 2016.

 

e.g.

Week53 2015 = 28DEC2015 - 03JAN2016

Week01 2016 = 07JAN2016 - 13JAN2016 (should be 04JAN2016-10JAN2016)

Week02 2016 = 11JAN2016 - 17JAN2016

 

Screen shots of prompt selecting and log after running:

Prompt2.jpg

Prompt3.jpg

 

 

Has anyone else come across this or found a solution?

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...

 

Tim

1 ACCEPTED SOLUTION

Accepted Solutions
TimCampbell
Quartz | Level 8

Response back from SAS support is that they are going to be raising it with R&D to consider a hotfix.

 

For the time being I have changed our reporting to use a normal date prompt and then am calculating the appropriate week values and label from that with the code below in case anyone else comes across this.

 

%let g_date_prompt_start = %sysfunc(intnx(week1.2,%sysfunc(inputn(&g_date_prompt,date9.),8.),0,B),date9.);
%let g_date_prompt_end   = %sysfunc(intnx(week1.2,%sysfunc(inputn(&g_date_prompt,date9.),8.),0,E),date9.);
%let g_date_prompt_label = %sysfunc(tranwrd(%sysfunc(scan(%sysfunc(inputn(&g_date_prompt,date9.),weekv11.),2,-)),W,Week )) %sysfunc(scan(%sysfunc(inputn(&g_date_prompt,date9.),weekv11.),1,-));

View solution in original post

5 REPLIES 5
Kurt_Bremser
Super User

Wow. Looks like you discovered a bug. Happens here with EG 4.3 and 6.1, SAS 9.2 (AIX) as backend.

This is a case for SAS TS, IMO.

 

Edit: the funny thing about this is that, while selecting the week and before hitting run, the correct dates are displayed.

TimCampbell
Quartz | Level 8

Have raised with SAS TS as well, will post back if i hear anything from them.

 

Added excitement is that the same thing happens if I am running a stored process in enterprise guide, but not if i run it in the stored process web app.

TimCampbell
Quartz | Level 8

Response back from SAS support is that they are going to be raising it with R&D to consider a hotfix.

 

For the time being I have changed our reporting to use a normal date prompt and then am calculating the appropriate week values and label from that with the code below in case anyone else comes across this.

 

%let g_date_prompt_start = %sysfunc(intnx(week1.2,%sysfunc(inputn(&g_date_prompt,date9.),8.),0,B),date9.);
%let g_date_prompt_end   = %sysfunc(intnx(week1.2,%sysfunc(inputn(&g_date_prompt,date9.),8.),0,E),date9.);
%let g_date_prompt_label = %sysfunc(tranwrd(%sysfunc(scan(%sysfunc(inputn(&g_date_prompt,date9.),weekv11.),2,-)),W,Week )) %sysfunc(scan(%sysfunc(inputn(&g_date_prompt,date9.),weekv11.),1,-));

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1383 views
  • 2 likes
  • 2 in conversation