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] Basic Date question from newbie

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Basic Date question from newbie
 Login/Join
 
Platinum Member
posted
I have a procedure that will be run in Report Caster that pulls information based on the AddDate field. I want it to pull information based on whether the AddDate field is less than or equal to &YYMD (RunDate) or greater than or equal to &YYMD - 5 (RunDateMin5).

What is the best way to do this? Should I define the fields in the metadata and then apply the filter in the procedure? When I tried this I used &YYMD as RunDate and DTADD(&YYMD,DAY,-5) as RunDateMin5. But I get no values for RunDateMin5.

Is this the best way to apply this filter and if so why do I get no values for RunDateMin5?

This message has been edited. Last edited by: <Kathryn Henning>,


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
Master
posted Hide Post
-SET &DT1 = DATEADD(&YYMD, 'D', -5);



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Platinum Member
posted Hide Post
What is the benefit from doing it as a SET value in the procedure as opposed to creating it as a defined item in the metadata. What if I want to use it continually in other queries? I can't seem to get the format correct for filtering on if I create the RunDateMin5 as a define.

It did work using the SET solution.


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
Master
posted Hide Post
Defines are created to add columns to a table, where sets are more for console fex level type stuff.

Method is the same and will work on Defines as well.

DEFINE FILE CAR
MYDATE/M-D-YY = DATEADD('&YYMD', 'D', -5);
END

TABLE FILE CAR
PRINT MYDATE
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Member
posted Hide Post
quote:
solution.

As Gavin: stated, Defines add a value for every row to your table, so there's overhead involved. If you are calculating a static value, use Dialogue Manager whenever possible.


WebFOCUS 8.1.0.5m
 
Posts: 26 | Registered: October 09, 2007Report This Post
Master
posted Hide Post
TABLE FILE CAR
PRINT COMPUTE MYDATE/M-D-YY = DATEADD('&YYMD', 'D', -5);
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Doesn't
 "AddDate field is less than or equal to &YYMD (RunDate) or greater than or equal to &YYMD - 5 (RunDateMin5)" 
equate to
 "WHERE AddDate LE RunDate OR AddDate GE RunDateMin5"? 
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
It seems to me that this condition is always true. Maybe it should be AND in stead of OR.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
 
Posts: 168 | Registered: March 29, 2013Report 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] Basic Date question from newbie

Copyright © 1996-2020 Information Builders