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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
DATES
 Login/Join
 
<Umar Farook S>
posted
Hi I need to select data between 2 dates.

DEFINE FILE MUREX
RUNDATE/MDY = &MDY;
DATE/I6YMD = RUNDATE;
BEFORE30DAYS/I6YMD = AYMD(DATE, -30, BEFORE30DAYS);
NEW_TRADE/I6YMD = TRADE_DATE;
END
-*
TABLE FILE MUREX
PRINT
ASSET_ID
SWAPID
STRADID
ASSET_TYPE
ASSET_SUB_TYPE
COUNTERPARTY_LONG_NAME
LEGAL_ENTITY_LONG_NAME
PORTFOLIO
TRADE_DATE
TRADE_TYPE
NOTIONAL_AMOUNT
TRADER_COMMENT
CONFIRMATION_COMMENT
WHERE NEW_TRADE GT BEFORE30DAYS AND TRADE_DATE LT DATE
BY SWAPID NOPRINT
ON TABLE HOLD AS MUREX1 FORMAT FOCUS INDEX SWAPID STRADID PORTFOLIO
END
-*
-EXIT

But i am unable to execute this code i get an error like
0 ERROR AT OR NEAR LINE 235 IN PROCEDURE MEMFEX FOCEXEC *
(FOC178) THE ADDITION OF TWO OR MORE DATE FIELDS IS INVALID
(FOC009) INCOMPLETE REQUEST STATEMENT

Please help me out on this.
 
Report This Post
Virtuoso
posted Hide Post
Try splitting your Where statment into two separate Where statments...


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
quote:
WHERE NEW_TRADE

How is NEW_TRADE defined as a date? If it is a smart date then make RUNDATE mdyy and just create BEFORE30DAYS as mdyy which is RUNDATE - 30.

If NEW_TRADE is MDYY then should work, but if it is say yymd, then make your dates yymd.

Of course it might be you just need parenthesis in your where statement

WHERE (NEW_TRADE GT BEFORE30DAYS) AND (TRADE_DATE LT DATE);


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
Another thing you might want to do is do your date targets in Dialog Manager. The technique you are using is fine (once you get it to work). However, you wind up recalculating your from and to dates for every row in your input file. That is one inefficiency.

Another is comparing your database fields to a defined field. If you input file is flat or FOCUS, it is no big deal. But if you do that against a relational data source, the WHERE will not be passed to the database and you will get many more rows back that WebFOCUS will have to process. In this case, using the Dialog Manager variables will make those WHERE tests against literals and the WHERE will be passed to the backend.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders