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] Strange behaviour of DEFINE in Master

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Strange behaviour of DEFINE in Master
 Login/Join
 
Expert
posted
I've opened a case for this, but was wondering if anyone else encountered this issue. I have two DEFINE columns in a Master. The column that uses DOWK to determine the day of the week has two issues: 1) the value does not display on all rows; 2) the value is wrong on the ones it does display on.

SET PAGE=NOLEAD
SET HTMLCSS=ON
-RUN

FILEDEF HRUN_LOG1 DISK hrun_log1.ftm
-RUN

-WRITE HRUN_LOG1 20131101022418000
-WRITE HRUN_LOG1 20131101025432000
-WRITE HRUN_LOG1 20131102012709000
-WRITE HRUN_LOG1 20131102103739000
-WRITE HRUN_LOG1 20131103001230000
-WRITE HRUN_LOG1 20131103141206000
-WRITE HRUN_LOG1 20131104105915000
-WRITE HRUN_LOG1 20131104130513000
-WRITE HRUN_LOG1 20131105122830000
-WRITE HRUN_LOG1 20131105160954000
-WRITE HRUN_LOG1 20131106083313000
-WRITE HRUN_LOG1 20131106091953000
-WRITE HRUN_LOG1 20131107010421000
-WRITE HRUN_LOG1 20131108003502000
-WRITE HRUN_LOG1 20131108183708000
-WRITE HRUN_LOG1 20131109090653000
-WRITE HRUN_LOG1 20131110091906000
-WRITE HRUN_LOG1 20131111063959000
-WRITE HRUN_LOG1 20131112065457000
-WRITE HRUN_LOG1 20131113095655000
-WRITE HRUN_LOG1 20131114051059000
-WRITE HRUN_LOG1 20131114051306000
-WRITE HRUN_LOG1 20131115050721000
-WRITE HRUN_LOG1 20131115232203000
-WRITE HRUN_LOG1 20131116091118000
-WRITE HRUN_LOG1 20131116101521000
-WRITE HRUN_LOG1 20131117050757000
-WRITE HRUN_LOG1 20131118110244000
-WRITE HRUN_LOG1 20131119054738000
-WRITE HRUN_LOG1 20131119054934000
-WRITE HRUN_LOG1 20131120031140000
-WRITE HRUN_LOG1 20131120061938000
-WRITE HRUN_LOG1 20131121100253000
-WRITE HRUN_LOG1 20131121100450000
-WRITE HRUN_LOG1 20131122050757000
-WRITE HRUN_LOG1 20131122051345000
-WRITE HRUN_LOG1 20131122112204000
-WRITE HRUN_LOG1 20131123091228000
-WRITE HRUN_LOG1 20131123091823000
-WRITE HRUN_LOG1 20131124090626000
-WRITE HRUN_LOG1 20131125054830000

FILEDEF MASTER DISK hrun_log1.mas
-RUN

-WRITE MASTER FILENAME=HRUN_LOG1, SUFFIX=FIX, IOTYPE=STREAM, $
-WRITE MASTER   SEGMENT=HRUN_LOG1, SEGTYPE=S0, $
-WRITE MASTER     FIELDNAME=END_DATE_TIME, ALIAS=E01, USAGE=HYYMDS, ACTUAL=A17, $
-WRITE MASTER DEFINE END_DATE/YYMD = HDATE(END_DATE_TIME, 'YYMD');
-WRITE MASTER DEFINE END_DATE_DOW/A12 = DOWK(END_DATE, 'A3');

TABLE FILE HRUN_LOG1
SUM
MIN.END_DATE_TIME
MIN.END_DATE_DOW

BY END_DATE

ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=9, BORDER=1, BORDER-COLOR=SILVER, $
ENDSTYLE
END
-RUN

TABLE FILE HRUN_LOG1
PRINT
END_DATE_TIME
END_DATE_DOW

BY END_DATE

ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=9, BORDER=1, BORDER-COLOR=SILVER, $
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Well, all of your sample dates are after the Mayan calendar end, so it can't be that ...... Wink

Please let us know what the outcome is as it is likely to affect many(?)

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
Hi Francis,

I assumed that you had looked at the documentation on DOWK (and not left it to memory Wink).

The input for DOWK should be I6YMD or I8YYMD and not smart date. Change your defines and this will work OK. Note that the DOWK is also documented output of A4 not A3.

Do you want the document link? Razzer

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
Oh well! Since the DOWK function was grouped under Date functions in the manual I ASSumed the input was a date!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Incidentally , if I follow the documented syntax, I get an error - because the doc specifies indate should be I6YMD or I8YMD, when it should be I6YMD or I8YYMD.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
quote:
I6YMD or I8YMD, when it should be I6YMD or I8YYMD

Yes, I seem to remember that "typo" that going back a few versions.

Out of interest, I just looked at my old UWS (the old red one - DN40021.0686 June 1986!!) and on page 14 it states -
Date (Numeric)        The input date in [YY]YYMMDD format.
OUTPUT (Alpha)        The returned day of the week.
Note: Output is an A4 field ....
The example shown does have DAY/A4 WITH COUNTRY=DOWK(801114,DAY); so even then it actually should specify I6YMD or I8YYMD.

I concentrate on trying to remember the myriad of function names so at least I can do a search of the document for the syntax and formats etc. I even had to do that for DOWK.

Obviously been a long week, put your feet up and have a beer Smiler


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 for the solution.

Will do!



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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] Strange behaviour of DEFINE in Master

Copyright © 1996-2020 Information Builders