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.
Hi, This is my code. -IF &Tme_Prd_Is EQ 'Later than this Date' THEN TP_DP2; -TP_DP2 -SET &Tme_Prd_Op = '>' ; -TYPE ++++++++++++++inside Later than this date++++++++++ -GOTO SNGL_OPT ;
-IF &Tme_Prd_Is EQ 'Before this Date' THEN BEF_DAT; -BEF_DAT -SET &Tme_Prd_Op = '<' ; -GOTO SNGL_OPT ;
-IF &Tme_Prd_Is EQ 'On this Date' OR &Tme_Prd_Is EQ 'Last Business Day' THEN LAS_BUS; -LAS_BUS -SET &Tme_Prd_Op = '=' ; -GOTO SNGL_OPT ; -SNGL_OPT "Time Period &Tme_Prd_Op &Tme_Prd_From_Date" -GOTO TMEPRD_FLT ; -IF &Tme_Prd_Is EQ 'Specific Quarter' OR &Tme_Prd_Is EQ 'Specific Month' OR &Tme_Prd_Is EQ 'Last Quarter' OR &Tme_Prd_Is EQ 'Last Month' OR &Tme_Prd_Is EQ 'Year to Date' OR &Tme_Prd_Is EQ 'Quarter to Date' OR &Tme_Prd_Is EQ 'Month to Date' THEN OPT_RAN; -OPT_RAN "Time Period From &Tme_Prd_From_Date To &Tme_Prd_To_Date" -GOTO TMEPRD_FLT ; -IF &Tme_Prd_Is EQ 'Date Range' THEN DAT_RAN ; -DAT_RAN "Time Period between &Tme_Prd_From_Date and &Tme_Prd_To_Date" -GOTO TMEPRD_FLT ; -TMEPRD_FLT
Let the value of &Tme_Prd_Is be 'Before this Date'
Whenever this value is checked,the first condition is always satisfied.That is wrong. Can anyone tell me what is the cause for this wrong behavior and suggest me a solution?
Thanks, Suji.
Webfocus 7.1 Oracle Database. Windows and Unix platform.
-IF &Tme_Prd_Is EQ 'Later than this Date' THEN GOTO :TP_DP2 ELSE IF &Tme_Prd_Is EQ 'Before this Date' THEN GOTO :BEF_DAT ELSE IF &Tme_Prd_Is EQ 'On this Date' OR &Tme_Prd_Is EQ 'Last Business Day' THEN GOTO :LAS_BUS;
-:TP_DP2 -SET &Tme_Prd_Op = '>' ; -TYPE ++++++++++++++inside Later than this date++++++++++ -GOTO :SNGL_OPT ;
I'm guessing that there is nothing keeping it from processing the TP_DP2 code; it's the next instruction. Try a couple more GOTOs to have that block skipped unless the condition is satisfied. Like:
-IF &Tme_Prd_Is EQ 'Later than this Date' THEN TP_DP2;
-GOTO SKIPDP2
-TP_DP2 -SET &Tme_Prd_Op = '>' ; -TYPE ++++++++++++++inside Later than this date++++++++++ -GOTO SNGL_OPT ;
-SKIPDP2
-IF &Tme_Prd_Is EQ 'Before this Date' THEN BEF_DAT;
Answer has already been posted by Danny, Frans, RM. For clarification, the thing to understand it that DM is not using case logic - the code under -TP_DP2 is not a "block" or "case". WF simply follows the code line-by-line. So following your logic the first IF is false so it won't THEN. However, since there is no ELSE or alternative path, it moves to the next line and performs what was intended for the THEN anyway. You need an ELSE to skip over that piece or provide an alternative branch.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007