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     [CLOSED] InfoAssist: Maximum DEFINE or COMPUTE formula length?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] InfoAssist: Maximum DEFINE or COMPUTE formula length?
 Login/Join
 
Silver Member
posted
Hi,

Does anyone know if there is any limitation on the size (that is number of characters) a DEFINE or COMPUTE formula may have?

I have a very large IF THEN ELSE condition and apparently due to it, InfoAssist is crashing. I am trying to remove conditions (not ideal from report perspective) to find out if there is any limitation in terms of characters and it's bit tedious. If anyone knows about any limitation, please could you let me know?

Thank you.

Kind regards,

Manoj.

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


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Report This Post
Virtuoso
posted Hide Post
I don't know of a limitation like that in InfoAssit. A good test is to see if the same DEFINE would work if you created it in a TEXT EDITOR outside of InfoAssist.

I also think if a DEFINE is that long, perhaps it belongs to a master file.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
What Babak said -- when I have an issue like that I put it in the Command Console through AppDoc AppStudio and run it with display commands option. This usually helps me debug any issue I'm having in InfoAssist. If you don't have access to AppStudio (our business users don't) hopefully someone you work with does and can help you out.
Also, a quick check, make sure the format of the define file is correct. My business users often forget to change it from the default (a numeric format) which can cause a crash when the result is an alpha.
Good luck!

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


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report This Post
Silver Member
posted Hide Post
Hi @BabakNYC

It is indeed a candidate for a master file. I assume only AppStudio can create a master file. Sadly we don't have access to the tool.

Thank for your reply. I shall check as per your reply next week.

Kind regards,

Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by DWaybright:
What Babak said -- when I have an issue like that I put it in the Command Console through AppDoc and run it with display commands option. This usually helps me debug any issue I'm having in InfoAssist. If you don't have access to AppDoc (our business users don't) hopefully someone you work with does and can help you out.
Also, a quick check, make sure the format of the define file is correct. My business users often forget to change it from the default (a numeric format) which can cause a crash when the result is an alpha.
Good luck!


Thank you very much. I am not sure what AppDoc is but I shall explore it next week.

Kind regards ,

Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Report This Post
Expert
posted Hide Post
quote:
a very large IF THEN ELSE

There used to be a limit of 64 (I think) pairs in IF THEN ELSE.

Break it into separate fields or think of using a DECODE if you can.

Remember that SQL codesets normally have a limit of 1000 entries. This is not a WebFOCUS limit but the RDBMS that you are targeting.

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
Expert
posted Hide Post
By separate fields I mean something like this -

COMPUTE MYCOMP/A100 = IF fielda EQ 'value' THEN 'result'
                 ELSE IF … etc.
                 ELSE 'X';
COMPUTE MYCOMP/A100 = IF MYCOMP NE 'X' THEN MYCOMP
                 ELSE IF … etc.
                 ELSE 'X';


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
Platinum Member
posted Hide Post
D'oh! I meant AppStudio, not AppDoc. That was an in-house application I used at a previous employer (so much that apparently my brain won't let it go!

Sorry for the confusion.
--Deb


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report This Post
Virtuoso
posted Hide Post
Adding COMPUTEs and DEFINEs is not limited to App Studio. You can add them using the Reporting Server Console if you have access. When you edit a synonym, you can insert a field and add the calculation logic to the synonym. No App Studio required.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
Have you tried DECODE? For example, when entering an address, items like Pre-Directional are selected from a picklist and store in the data base as a number. So when printing the address the Post Directional is decoded back to it value. We put the values in a table call adpredir.ftm. Filedef the table then use DECODE instead of If-Then-Else.

These are the values in adpredir.ftm
35 'E'
36 'N'
37 'NE'
38 'NW'
39 'S'
40 'SE'
41 'SW'
42 'W'


Then when building the address for printing inside DEFINE FILE we use the following (AD_PREDIR is a field in CLADD):
FILEDEF PREDIR DISK code_tables/adpredir.ftm ( LRECL 24 RECFM V
DEFINE CLADD
PREDIR/A2=DECODE AD_PREDIR(PREDIR ELSE '');
END


We do the same the with Street Suffixes, Post Directional, Unit Type, State, a 150 other fields in the database. These items (and many others), when they are entered, they are selected not manually typed. This allows our address to be entered in a standard, uniform format and allows for printing the address in the standard USPS format and we get a discount for mailing. I don't have to worry about someone entering STREET, ST, St, St., Stret, Strt, or any other way it could be mistyped.

Bottom line is using a file like this, you can put Entries in a file once, store it, and use it all the time.

You can use a similar technique for IF and WHERE statements. Say your values are in a SAVE file. Then you can use "If field EQ (SAVE)" or WHERE field IN FILE SAVE.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by Tony A:
By separate fields I mean something like this -

COMPUTE MYCOMP/A100 = IF fielda EQ 'value' THEN 'result'
                 ELSE IF … etc.
                 ELSE 'X';
COMPUTE MYCOMP/A100 = IF MYCOMP NE 'X' THEN MYCOMP
                 ELSE IF … etc.
                 ELSE 'X';


T


Many thanks Tony for explaining the idea clearly with the examples.

Kind regards,

Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Report This Post
Silver Member
posted Hide Post
Thanks all for your inputs.

There is no issue now. I made a mistake in preparing the formula definitions. As there are a lot of IF THEN ELSE conditions, I used an Excel file to prepare the formula and for two out of three such formulae, I was wrongly referring to a wrong cell value (in Excel) which was causing InfoAssit to display an error and crash.

Apologies for my mistake. _/\_

Kind regards,

Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Report 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     [CLOSED] InfoAssist: Maximum DEFINE or COMPUTE formula length?

Copyright © 1996-2020 Information Builders