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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you have any questions or need access: Contact firstname.lastname@example.org
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?
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 ;
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.
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