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] help with debugging this statement

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] help with debugging this statement
 Login/Join
 
Platinum Member
posted
I am getting the following error and can't find my error could someone offer assistance please.

Error
 -* Calculated Amt
 DCALCAMT    /D20.2MB = IF (action_type = '3') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
 -                      ELSE IF (action_type = '7') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
 -                      ELSE IF (action_type = 'B') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
 -                      ELSE IF (action_type = '4') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
 -                      ELSE IF (action_type = 'C') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
 -                      ELSE 0.00;
 0 ERROR AT OR NEAR LINE    246  IN PROCEDURE rf_daily_ach_activ
 (FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR
  


My Master

 
FILENAME=ACHRFD001, SUFFIX=FIX     , $
  SEGMENT=ACHRFD00, SEGTYPE=S0, $
    FIELDNAME=bank_num, ALIAS=E01, USAGE=A4, ACTUAL=A04,
      MISSING=ON, $
    FIELDNAME=be_merch_num, ALIAS=E02, USAGE=A16, ACTUAL=A16,
      MISSING=ON, $
    FIELDNAME=dba_nam, ALIAS=E03, USAGE=A25, ACTUAL=A25,
      MISSING=ON, $
    FIELDNAME=assoc_num, ALIAS=E04, USAGE=A6, ACTUAL=A06,
      MISSING=ON, $
    FIELDNAME=group_1_num, ALIAS=E05, USAGE=A6, ACTUAL=A06,
      MISSING=ON, $
    FIELDNAME=action_type, ALIAS=E06, USAGE=A7, ACTUAL=A07,
      MISSING=ON, $
    FIELDNAME=action_type_cd, ALIAS=E07, USAGE=A1, ACTUAL=A01,
      MISSING=ON, $
    FIELDNAME=activity_dtm, ALIAS=E08, USAGE=HYYMDs, ACTUAL=A17,
      MISSING=ON, $
    FIELDNAME=reserve_dda_num, ALIAS=E09, USAGE=A17, ACTUAL=A17,
      MISSING=ON, $
    FIELDNAME=reserve_tr_num, ALIAS=E10, USAGE=A9, ACTUAL=A09,
      MISSING=ON, $
    FIELDNAME=bank_reserve_release_desc, ALIAS=E11, USAGE=A12, ACTUAL=A12,
      MISSING=ON, $
    FIELDNAME=reserve_release_pct, ALIAS=E12, USAGE=P7.2, ACTUAL=A07,
      MISSING=ON, $
    FIELDNAME=reserve_release_amt, ALIAS=E13, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=reserve_max_amt, ALIAS=E14, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=reserve_min_amt, ALIAS=E15, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=ach_ind, ALIAS=E16, USAGE=A8, ACTUAL=A08,
      MISSING=ON, $
    FIELDNAME=carry_over_ind, ALIAS=E17, USAGE=A3, ACTUAL=A03,
      MISSING=ON, $
    FIELDNAME=gross_sales_amt, ALIAS=E18, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=ach_net_deposit_amt, ALIAS=E19, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=ach_final_net_deposit_amt, ALIAS=E20, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=carryover_amt, ALIAS=E21, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=carryover_balance_amt, ALIAS=E22, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=reserve_balance_amt, ALIAS=E23, USAGE=P15.2, ACTUAL=A15,
      MISSING=ON, $
    FIELDNAME=A_RELRES_ID, ALIAS=E24, USAGE=A12, ACTUAL=A12, $
 


My Statement:

 
-* Calculated Amt
DCALCAMT    /D20.2MB = IF (action_type = '3') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
-                      ELSE IF (action_type = '7') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
-                      ELSE IF (action_type = 'B') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
-                      ELSE IF (action_type = '4') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
-                      ELSE IF (action_type = 'C') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
-                      ELSE 0.00;
 

This message has been edited. Last edited by: Kerry,




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
You don't need a dash in the first column when continuing a COMPUTE or DEFINE


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
And the statement construction is wrong


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
This is perhaps what you're trying to do:

DCALCAMT/D20.2MB =
IF (action_type EQ '3') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE
IF (action_type EQ '3') AND (reserve_release_pct LE 0.00) THEN reserve_release_amt ELSE
IF (action_type EQ '7') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE
IF (action_type EQ '7') AND (reserve_release_pct LE 0.00) THEN reserve_release_amt ELSE
IF (action_type EQ 'B') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE
IF (action_type EQ 'B') AND (reserve_release_pct LE 0.00) THEN reserve_release_amt ELSE
IF (action_type EQ '4') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE
IF (action_type EQ '4') AND (reserve_release_pct LE 0.00) THEN (reserve_release_amt * (-1)) ELSE
IF (action_type EQ 'C') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE
IF (action_type EQ 'C') AND (reserve_release_pct LE 0.00) THEN (reserve_release_amt * (-1)) ELSE 0.00;
END


Note the = signs in the IF statements should be EQ


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
Platinum Member
posted Hide Post
Thanks for responding Francis..

I am now getting the following:
 
 0 ERROR AT OR NEAR LINE    246  IN PROCEDURE rf_daily_ach_activ
 (FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH: @
 0 ERROR AT OR NEAR LINE    246  IN PROCEDURE rf_daily_ach_activ
 (FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
 0 ERROR AT OR NEAR LINE    254  IN PROCEDURE rf_daily_ach_activ 


With this code: I increased the size of DCALCAMT i know the result will not be this large
DCALCAMT    /D30.2MB = IF (action_type = 3) AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
                      ELSE IF (action_type = '7') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
                      ELSE IF (action_type = 'B') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) ELSE reserve_release_amt
                      ELSE IF (action_type = '4') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
                      ELSE IF (action_type = 'C') AND (reserve_release_pct GT 0.00) THEN gross_sales_amt * (reserve_release_pct * 0.01) * (-1) ELSE (reserve_release_amt * (-1))
                      ELSE 0.00;  




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Platinum Member
posted Hide Post
Francis,

What's wrong with the statement construction




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Platinum Member
posted Hide Post
Sorry Francis,

I'm trying to do to many things at one time...I'll try your example...

Please disregard my previous post...

Thanks




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Platinum Member
posted Hide Post
Francis,

Thanks alot for your suggestions...they all worked for me...

Thanks again,

Timothy




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report 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] help with debugging this statement

Copyright © 1996-2020 Information Builders