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] Computed Sequential Number - Different values for Different PCHOLD

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Computed Sequential Number - Different values for Different PCHOLD
 Login/Join
 
Gold member
posted
I sometimes create a sequential number using LAST in a COMPUTE to reference rows for conditions like this:
SUM
COMPUTE REC_SEQ/I8 = 1 + LAST REC_SEQ;NOPRINT
COMPUTE ACCT_CNT_TOT/I8=TOT.ACCT_CNT; NOPRINT
ACCT_CNT/I8C AS '# Accounts'
COMPUTE REMAIN/I8C =IF ( REC_SEQ EQ 1 ) THEN ACCT_CNT_TOT - ACCT ELSE ( REMAIN - ACCT_CNT );
BY WF_ITEM AS 'Criteria Group'

This REQ_SEQ starts at 1 when I output to XLSX as I would expect. However, when I try to output to HTML or PDF, the counter starts at 8.

Can anyone think of why this might occur? Is there some HTML SET command that would correct this?
thanks

Bob

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


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Gold member
posted Hide Post
Hi Bob,
I created your compute field on CAR file and it works perfectly fine in all 3 o/p options.

If you are looking for a Sequential Counter you dont have to use LAST you can just say

COMPUTE REC_SEQ/I8 = 1 + REC_SEQ;

and it will still work.

If you have a sample code we all can look at that will be handy...


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Report This Post
Gold member
posted Hide Post
Thanks for the tip about LAST. Should have realized that as I'm not doing it elsewhere.

I just did in CAR as well and works fine. So I backed out pieces of my code to see if I could find the cause.
It seems to happen when I use ON TABLE SET SUBTOTALS ABOVE
I see what it's doing because of this. The COMPUTE must recognize the total row as the final row. In my example, it's the 7th row. And it's building off that even though I'm not referencing it. Removing LAST does not fix.


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Guru
posted Hide Post
Should Remain be a value that is counting down per WF_ITEM? Then I would try solving this with PARTITION_AGGR. COMPUTE REMAIN/I8C = TOT.ACCT_CNT - PARTITION_AGGR(ACCT_CNT, WF_ITEM , B, C, SUM);

Otherwise do a
SUM
ACCT_CNT/I8C AS '# Accounts'
RANKED BY WF_ITEM AS 'Criteria Group'
ON TABLE HOLD FORMAT FOCUS
END

and do a define on this. Then sort on RANK in your next TABLE request.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report 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] Computed Sequential Number - Different values for Different PCHOLD

Copyright © 1996-2020 Information Builders