Focal Point
Number of RECAP statements

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6971067331

December 04, 2003, 03:28 PM
<Cisco>
Number of RECAP statements
Does anyone know if you can use more than 7 RECAP statements in one focexec?

I get an error telling me I've exceeded the maximum number if I use more than this. Is there a way to increase this number or to turn off the flag completely?
December 04, 2003, 06:56 PM
Mikel
I think it isn't possible to avoid this limit. But, with FOCUS, we always have alternatives.

In this case, probably you can use a multiverb query with the appropriate COMPUTEs.

Example. (FOC107) with 8 RECAPS.

-* PROBLEM (FOC107).
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON COUNTRY SUBTOTAL
RECAP SAL1/D15.2 = SALES + 1 ;
RECAP SAL2/D15.2 = SALES + 2 ;
RECAP SAL3/D15.2 = SALES + 3 ;
RECAP SAL4/D15.2 = SALES + 4 ;
RECAP SAL5/D15.2 = SALES + 5 ;
RECAP SAL6/D15.2 = SALES + 6 ;
RECAP SAL7/D15.2 = SALES + 7 ;
RECAP SAL8/D15.2 = SALES + 8 ;
END
-RUN

0 ERROR AT OR NEAR LINE 25 IN PROCEDURE
(FOC107) THE NUMBER OF RECAP FIELDS EXCEEDS 7
(FOC009) INCOMPLETE REQUEST
STATEMENT BYPASSING TO END OF COMMAND[/code]Example. POSSIBLE WORKAROUND using multiverb.

* POSSIBLE WORKAROUND
TABLE FILE CAR
-* First SUM, COUNTRY totals calculations.
SUM
COMPUTE SAL1/D15.2 = SALES + 1 ; NOPRINT
COMPUTE SAL2/D15.2 = SALES + 2 ; NOPRINT
COMPUTE SAL3/D15.2 = SALES + 3 ; NOPRINT
COMPUTE SAL4/D15.2 = SALES + 4 ; NOPRINT
COMPUTE SAL5/D15.2 = SALES + 5 ; NOPRINT
COMPUTE SAL6/D15.2 = SALES + 6 ; NOPRINT
COMPUTE SAL7/D15.2 = SALES + 7 ; NOPRINT
COMPUTE SAL8/D15.2 = SALES + 8 ; NOPRINT
BY COUNTRY

-* Second SUM, detail.
SUM
SALES
BY COUNTRY
BY CAR

-* COUNTRY field subfoot with precalculated totals.
ON COUNTRY SUBFOOT
"END
-RUN
Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
December 04, 2003, 07:21 PM
Mikel
Me again... See also the following documentation:
quote:
Ref:Usage Notes for RECAP.

The word RECAP may not be specified more than seven times. However, more than seven RECAP calculations are permitted. Use the following syntax:
ON fieldname
RECAP field1/format= ... ;
field2/format= ... ;
.
.
Previous example using RECAP keyword only one time.
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON COUNTRY SUBTOTAL
RECAP SAL1/D15.2 = SALES + 1 ;
SAL2/D15.2 = SALES + 2 ;
SAL3/D15.2 = SALES + 3 ;
SAL4/D15.2 = SALES + 4 ;
SAL5/D15.2 = SALES + 5 ;
SAL6/D15.2 = SALES + 6 ;
SAL7/D15.2 = SALES + 7 ;
SAL8/D15.2 = SALES + 8 ;
END
-RUN
Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
December 09, 2003, 09:42 AM
<Cisco>
Thanks, this is what I needed!