Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Order of Operations
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Order of Operations
 Login/Join
 
Member
posted
Is there any documentation dedicated to explaining the order of operations in WebFOCUS? We are familiar with the differences between DEFINE and COMPUTE and WHERE and WHERE TOTAL; but, we would like to know more about how our requests are processed and how these statements may interact with and/or be affected by sorting and other selection criteria.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.6.11, Windows
 
Posts: 5 | Registered: July 18, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What DBMS are you using? A whole bunch of this information depends on that.


WebFOCUS 8206, Unix, Windows
 
Posts: 1707 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Member
posted Hide Post
I'm not 100% fluent in describing our system. I'm primarily a report developer not a system administrator. Is there a place where I can look for information about our DBMS? I think our tables are stored on an AS 400 mainframe.


WebFOCUS 7.6.11, Windows
 
Posts: 5 | Registered: July 18, 2019Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
the differences between DEFINE and COMPUTE and WHERE and WHERE TOTAL
... can be found by looking up the commands in the WebFOCUS Help Utility.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
I'm pretty sure that it follows PEMDAS:

  • P - Parentheses first
  • E - Exponents (ie Powers and Square Roots, etc.)
  • MD - Multiplication and Division (left-to-right)
  • AS - Addition and Subtraction (left-to-right)


Wink

[I know that's not what the OP meant, but I couldn't resist]


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 485 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
If you're on AS400, most likely your tables are DB2. The best way to find out is to look at the .mas files on your ibi\apps directory and see what SUFFIX= value is.

Order of operation is pretty much what you learned in high school Algebra. Report Optimization (forcing WebFOCUS to generate the most efficient SQL to talk to your DBMS) is fully documented in the Adapter manual. Search the doc for Optimization and you'll get plenty of content to read. Here's the adapter manual. Go to DB2 and search for Optimization.
https://webfocusinfocenter.inf...adapteradmin7710.pdf


WebFOCUS 8206, Unix, Windows
 
Posts: 1707 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Master
posted Hide Post
A long time ago, IBI taught classes on this. They may still so you may want some training.

You might try this topic. It is a little old but gives general overview. This isn't exactly right but it is close. Things have changed a little since 2011.

http://forums.informationbuild...1057331/m/7637047106

As BabakNYC said, a lot depends on the database and the SQL that WebFOCUS generates. One thing to be aware of as IBI makes improvements in the SQL it generates, things that work, may stop working or return different results in future release. For example, as a long time FOCUS language code, I would COMPUTE switch values with a Boolean statement, i.e.
COMPUTE KEEPREC/I1=CHILD_SW EQ 'Y' AND NONPARTSW EQ 'N';


This had never generated as SQL but when we went to release 8, in some cases it would and the SQL returned results that were not intended. I had to change the statement to this to get the desired results:
COMPUTE KEEPREC/I1=IF CHILD_SW EQ 'Y' AND NONPARTSW EQ 'N' THEN 1 ELSE 0;


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 938 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
I asked My Dear Aunt Sally about PEMDAS, and that's good for the mathematical hierarchy. But, DEFINEs and COMPUTEs are DEFINEs first, on the source, then COMPUTEs on the matrix.

There's so much more to this, and as JGelona said "They may still so you may want some training."
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
quote:
...we would like to know more about how our requests are processed...

Sounds like you are interested in TABLE (WebFOCUS Reporting) internals.

If so, point your browser to IB's Webinar 'FOCUS: TABLE Internals':
https://www.informationbuilder...ialogue-manager-flow

The 'Two Walters' do a great job discussing TABLE internals. Their examples and supplementary materials are top notch.

I think it is great that you want to go beyond knowing the syntax and want to understand 'how/when FOCUS does what'.

For sure this type of knowledge has made me a better developer and enjoy the product even more.

Enjoy!




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 780 | Registered: April 23, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Thanks for the Kudos David!

Walter Brengel

FOCUS Virtual User Group
Please join us and other FOCUS/WebFOCUS coders for the next FOCUS Virtual User Group meeting.

FOCUS Virtual User Group - for the latest schedule and to sign up.
https://www.informationbuilder...wledgeshare-webinars

Virtual User Group Archives – for past sessions.
https://www.informationbuilder...ledge-share-webinars
 
Posts: 3 | Registered: September 05, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Order of Operations

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.