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] Code tightening problem wfs version 4 to wfs version 7

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Code tightening problem wfs version 4 to wfs version 7
 Login/Join
 
Gold member
posted
Hi,

I have an old report that I cannot migrate to out new version of webfocus. I think the reason is because of code tightening.
The old report has two SUMS (I am told this is called a multipath report). But this does not run in dev studio on our new version.

TABLE FILE HD1
SUM
 TOTNUM/D5  AS 'TOTAL,NO'
 TOTNET/D8  AS 'TOTAL,NET AMOUNT'
 CLEARNUM/D5  AS 'CLEARED,NO'
 COMPUTE PNO/D3=CLEARNUM*100/TOTNUM;  AS '%'
 CLEARNET/D8 AS 'CLEARED,NET AMT'
 COMPUTE PAMT/D3=CLEARNET*100/TOTNET; AS '%'
BY BOUNCE NOPRINT PAGE-BREAK
BY SECTOR SUBHEAD
"</1 ** TOTAL **"
WHEN SECTOR EQ 'ZZ'
SUM
 NO/D5   AS 'NO'
 AMT/D8  AS 'NET AMT'
BY BOUNCE NOPRINT
BY SECTOR
ACROSS REJECT AS REJECTIONS
END


I get an error in Dev studio because of the second SUM.

I have tried to get a similar result but with little success. Has anyone come up with a way around this in newer versions of wfs? I am unfortunately quite new to wfs so a little clueless ;-).

Thanks!

Jinx.

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


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
<JG>
posted
Jinx,

You get the error because of the WHEN not the second SUM.

Change it to WHERE and it will work.
 
Report This Post
Gold member
posted Hide Post
OH! I am such an idiot! It never even occurred to me that the WHEN was the problem, I had never seen SUM used twice so it looked all wrong - by removing the WHEN statement completely I get an acceptable result. It is odd though that the WHEN does work when one changes the code slightly. according to the local expert here (old version expert), the WHEN is/was used for formatting when using a compute.

Thanks!


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
<JG>
posted
quote:
mulipath


multi-verb is the correct description.

WHEN is used for conditional processing on various WebFocus options.

However in this case it was being applied as an IF or WHERE selection.

You've being exploiting a bug for years.
 
Report This Post
Gold member
posted Hide Post
This code works on the new version and produces exactly the same as on old. The WHEN was not used as an IF/WHERE replacement.

TABLE FILE HD1
SUM
 TOTNUM/D12 AS 'TOTAL,NO'
 TOTNET/D12 AS 'TOTAL,NET AMOUNT'
 CLEARNUM/D12  AS 'CLEARED,NO'
 COMPUTE PNO/D12=CLEARNUM*100/TOTNUM;  AS '%'
 CLEARNET/D12 AS 'CLEARED,NET AMT'
 COMPUTE PAMT/D12=CLEARNET*100/TOTNET; AS '%'
BY BOUNCE NOPRINT PAGE-BREAK
BY SECTOR 
SUM
 NO/D12                                AS 'NO'
 AMT/D12                               AS 'NET AMT'
BY BOUNCE NOPRINT
BY SECTOR
ACROSS REJECT AS REJECTIONS
BY SECTOR SUBHEAD
"</1 ** TOTAL **"
WHEN SECTOR EQ 'ZZ'
END  


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Report This Post
<JG>
posted
 BY SECTOR SUBHEAD
"</1 ** TOTAL **"
WHEN SECTOR EQ 'ZZ'
 

Quite correct Jinks.

My eyes are getting old.

The syntax is wrong, that's the problem.

You need a ';' semi-colon to terminate the WHEN.

Sometimes you get away with it but in a multi-verb request the code tightning
forces the need for the syntax to be correct, and it says it must be there.
  
 
Report 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] Code tightening problem wfs version 4 to wfs version 7

Copyright © 1996-2020 Information Builders