Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Day of the Week is acting funny. Possible glitch?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Day of the Week is acting funny. Possible glitch?
 Login/Join
 
Member
posted
I am witness to an interesting problem that I can't figure out. The boss upstairs wanted the day of the week in addition to the date. I created a define field in the master file to take the DOWK(DATE,'A3'), and I inserted the field as a "BY" in the Report Painter. When I ran the report, the correct output from November 1 - Nov 15 is displayed (Sun, Mon, Tue, etc.), but from every date from then on, the field is empty.
It makes no sense, so I was wondering if anyone had encountered this error, and more importantly, if anyone knows what the problem might be.

Thanks

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.2: Windows 7: all output (Excel, HTML, PDF)
 
Posts: 18 | Registered: June 22, 2010Report This Post
Expert
posted Hide Post
What format is the DATE field ?

DOWK requires a date in I6YMD or I8YYMD format.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
All OK in 7.7.01 using the following code. Test it on your 7.7.02 set-up and if you have any problems then I would recommend giving IB support a call.

EX -LINES 3 EDAPUT MASTER,DATERNG,CF,MEM,FILENAME=DATERNG, SUFFIX=FOC,$
SEGNAME=SEG1
FIELD=DATE_KEY, ,DMYY ,DMYY , $
-RUN
-* Now create it
CREATE FILE DATERNG
-* and add all possible dates within a month
MODIFY FILE DATERNG
FREEFORM DATE_KEY.A8.
LOG FORMAT MSG OFF
LOG TRANS MSG OFF
LOG INVALID MSG OFF
DATA
-* This repeat loop will ensure at least a whole month is input,
-* Any invalid dates will be rejected.
-DEFAULT &Year  = 2010
-SET &Year  = EDIT(&YYMD,'9999$');
-SET &Mnth = 11;
-SET &Day   = 1;
-REPEAT :Loop1 31 TIMES;
-SET &Date = IF &Day LT 10 THEN '0' || &Day ELSE &Day;
&Date&Mnth&Year
-SET &Day = &Day + 1;
-:Loop1
END
-RUN
-*
DEFINE FILE DATERNG
  KEY_YYMD/I8YYMD = DATE_KEY;
  DOW/A3          = DOWK(KEY_YYMD,'A3');
END
-*
TABLE FILE DATERNG
PRINT DOW
   BY DATE_KEY
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  GRID=OFF, SIZE=10, $
ENDSTYLE
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Thanks Waz and Tony for the input.

jjeanjaquet, suggestion from our technicals:

If the date field is a smart date field then you can take advantage of the date formatting of W for day of the week.
Here is an example:

DEFINE FILE EMPDATA
HIREDATEDOW/Wt=HIREDATE;
END
TABLE FILE EMPDATA
SUM CNT.PIN
BY HIREDATEDOW
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Member
posted Hide Post
Thanks everbody. I did what Kerry suggested and used the date format "Wt" instead of creating an expression using DOWK() and that seems to have done the trick.

Much appreciated,

Joe


WebFOCUS 7.7.2: Windows 7: all output (Excel, HTML, PDF)
 
Posts: 18 | Registered: June 22, 2010Report This Post
Expert
posted Hide Post
At least we now know it was a Smart Date field.

Many options available.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Day of the Week is acting funny. Possible glitch?

Copyright © 1996-2020 Information Builders