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] FML - RECAPturing FMLFOR('A8') problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] FML - RECAPturing FMLFOR('A8') problem
 Login/Join
 
Guru
posted
 APP APPENDPATH IBISAMP
TABLE FILE GGSALES
SUM 
COMPUTE CAT/A8 = FMLFOR('A8');
DOLLARS
FOR 
	CATEGORY
'Coffee' AS 'Original Coffee line' LABEL R0  OVER
'Coffee' AS 'Original Coffee line' LABEL R1  OVER
RECAP
   CR1 = IF R1 GT 4200000 THEN R1 ELSE 0;
   CR1(1) = FMLFOR('A8');
   AS 'Recap coffee line' OVER
'Food' AS 'Food' LABEL R2 OVER
RECAP 
	FR2(1) = FMLFOR('A8'); AS 'Recap food line' OVER
'Gifts' AS 'Gifts' LABEL R3
ON TABLE NOTOTAL
END
 


It is no big deal to hard code the for-value here, but I just wondering why RECAPturing of the FMLFOR is always the next one. Confused

Hua

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Gold member
posted Hide Post
Your result is odd...
almost like the opposite of LAST.

Don't you really mean for the COMPUTE to be after the data read?

Is this the result you're looking for?

APP APPENDPATH IBISAMP
TABLE FILE GGSALES
SUM
-*COMPUTE CAT/A8 = FMLFOR('A8');
DOLLARS
COMPUTE CAT/A8 = FMLFOR('A8');
FOR
CATEGORY
'Coffee' AS 'Original Coffee line' LABEL R0 OVER
'Coffee' AS 'Original Coffee line' LABEL R1 OVER
RECAP
CR1 = IF R1 GT 4200000 THEN R1 ELSE 0;
CR1(1) = FMLFOR('A8');
AS 'Recap coffee line' OVER
'Food' AS 'Food' LABEL R2 OVER
RECAP
FR2(1) = FMLFOR('A8'); AS 'Recap food line' OVER
'Gifts' AS 'Gifts' LABEL R3
ON TABLE NOTOTAL
END


The docs give this example......

SET FORMULTIPLE = ON
TABLE FILE LEDGER
SUM AMOUNT
COMPUTE RETURNEDFOR/A8 = FMLFOR('A8');
FOR ACCOUNT
1010 OVER 1020 OVER
1030 OVER
BAR OVER
1030 OR 1020 OR 1010
END

the output is.....

AMOUNT RETURNEDFOR
------ -----------
1010 8,784 1010
1020 4,494 1020
1030 7,961 1030
------ --------
1010 21,239 1030


WebFocus 7x, 8x, Win / Linux, any output format
 
Posts: 70 | Location: reading, pa | Registered: April 07, 2007Report This Post
Guru
posted Hide Post
jnc,

This only happened when you do a RECAP. The example you gave doesn't involve RECAP, so the result is ok.

Thanks for reply.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report 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] FML - RECAPturing FMLFOR('A8') problem

Copyright © 1996-2020 Information Builders