Focal Point
FOC262 error message

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

October 09, 2004, 02:15 AM
Ringo
FOC262 error message
Can anyone help me to solve this problem, my code as follow:

-SET &APL = IF (((&LONSTAT1 EQ 1) AND (&TENOR EQ 0)) AND ((&LONSTAT2 EQ 1) OR (&LONSTAT3 EQ 1) OR (&LONSTAT4 EQ 1) OR (&LONSTAT5 EQ 1) OR (&LONSTAT6 EQ 1) OR (&LONSTAT7 EQ 1) OR (&LONSTAT8 EQ 1) OR (&LONSTAT9 EQ 1) OR (&LONSTAT10 EQ 1) OR (&LONSTAT11 EQ 1) OR (&LONSTAT12 EQ 1))) THEN 'OPEN BREAK' ELSE 'BREAK';


while running the report, it show me the error message as follow:

0 ERROR AT OR NEAR LINE 431 IN PROCEDURE __T00060FOCEXEC *
(FOC262) UNBALANCED PARENTHESES


How to solve it?

This message has been edited. Last edited by: <Mabel>,
October 09, 2004, 02:40 AM
Piipster
The following looks ok. I just reformatted it so
I could read it more easily.
If it spans across multiple lines you must put a '- ' (dash space) at the beginning of each subsequent line.

-SET &APL = IF
- (
- ((&LONSTAT1 EQ 1) AND (&TENOR EQ 0))
- AND
- ((&LONSTAT2 EQ 1) OR (&LONSTAT3 EQ 1) OR
- (&LONSTAT4 EQ 1) OR (&LONSTAT5 EQ 1) OR
- (&LONSTAT6 EQ 1) OR (&LONSTAT7 EQ 1) OR
- (&LONSTAT8 EQ 1) OR (&LONSTAT9 EQ 1) OR
- (&LONSTAT10 EQ 1) OR (&LONSTAT11 EQ 1) OR
- (&LONSTAT12 EQ 1))
- ) THEN 'OPEN BREAK' ELSE 'BREAK';

If this doesn't help, try using &ECHO to debug what it is actually coming out to be. ie.
-SET &ECHO=ALL;

This will show you the code you wrote as well
as what it looks like after you substitute the
values for the variables.
October 09, 2004, 03:39 AM
Ringo
Thanks Piippo, I've try this. But the same error had happen.
October 09, 2004, 04:06 AM
Piipster
Did you try the &ECHO as well?
What does that show you?

If the values that you are passing into
the &vars have spaces or special characters in
them you will probably need to enclose them in single quotes '&TENOR' EQ ...
October 09, 2004, 04:47 AM
susannah
try breaking it into two bits
-SET &FLAG1 = IF (&LONSTAT1 EQ 1) AND (&TENOR EQ 0) THEN 1 ELSE 0;
-SET &FLAG2 = IF &LONSTAT2 EQ 1 THEN 1 ELSE
-IF &LONSTAT3 EQ 1 THEN 1 ELSE
-IF &LONSTAT4 EQ 1 THEN 1 ELSE
-IF &LONSTAT5 EQ 1 THEN 1 ELSE
-IF &LONSTAT6 EQ 1 THEN 1 ELSE
-IF &LONSTAT7 EQ 1 THEN 1 ELSE
-IF &LONSTAT8 EQ 1 THEN 1 ELSE
-IF &LONSTAT9 EQ 1 THEN 1 ELSE
-IF &LONSTAT10 EQ 1 THEN 1 ELSE
-IF &LONSTAT11 EQ 1 THEN 1 ELSE
-IF &LONSTAT12 EQ 1 THEN 1 ELSE 0;
-SET &APL =IF &FLAG1 EQ 1 AND &FLAG1 EQ 1 THEN
- 'OPEN BREAK' ELSE 'BREAK';
October 09, 2004, 06:08 AM
Ringo
Thanks Pippo & Susannah.

I will try it later.

Piippo, actually, the parameters had been passed into and show me as well (-SET &ECHO=ALLWink