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] At what point is a define too large?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] At what point is a define too large?
 Login/Join
 
Gold member
posted
Excuse my lack of knowledge on this issue. I have a define with something in the neighborhood of 140 "if then else" statements and am getting the error:

0 ERROR AT OR NEAR LINE 145 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC553) A COMPUTATIONAL EXPRESSION IS TOO LARGE

There is no error at line 145, and so I'm now wondering if I need to split my define into multiple pieces?

Thoughts?

PS I can post the define, but I figure no one wanted to look at that many if then else statements.

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


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 82 | Location: Abbotsford BC | Registered: March 15, 2010Report This Post
Gold member
posted Hide Post
Hi Max,

There is a limit on length of define field. The limit
is approximately 32K. You might need to split the define up into two expressions, or issue the command SET COMPUTE=OLD and retry.

If it doesn't work, Please post your define statement also.

Thanks,
Pravin Singh


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
 
Posts: 51 | Location: WebFOCUS 7.7.03 | Registered: June 19, 2014Report This Post
Master
posted Hide Post
This will also have performance problem. Say you have 100 records, then WF reporting server need to evaluate 100*140=14,000 times(worst case) to assign value for that define field.
There will be better ways to implement same logic, please share your code.
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Gold member
posted Hide Post
Most of these kinds of limits have been lifted in 7.7.06. I agree with Ram, however, you should not code these huge if-then-elses when, for instance, a decode would do.


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
quote:
no one wanted to look at that many if then else statements

Excellent, someone with smarts Wink

However, in addition to the above suggestions, bear in mind that your code will (eventually) need to be maintained and seeing that many IF .. THEN .. ELSE statements ......

Depending upon the type of tests, think how you might be able to replace them with, as Edward suggests, decodes - either inline or via file.

Remember that MS SQL and Oracle have 1000 limits and at that point you may want to consider a join to the lookup file instead.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Hi Everyone,

Thanks for the suggestions. I was using an if then else statement because I basically had a<,>b<,>c<,>d, and permutations based on which combinations of a,b,c,d were null. 140 was too few, it ended up being around 250 if then else statements. I split into 2 parts about the same size and then a 3rd define that combined them all.


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 82 | Location: Abbotsford BC | Registered: March 15, 2010Report 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] At what point is a define too large?

Copyright © 1996-2020 Information Builders