

Go  New  Search  Notify  Tools  Reply 
Gold member 
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>,  

Guru 
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.  

Gold member 
Thanks Piippo, I've try this. But the same error had happen.  

Guru 
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 ...  

Expert 
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';  

Gold member 
Thanks Pippo & Susannah. I will try it later. Piippo, actually, the parameters had been passed into and show me as well (SET &ECHO=ALL  

Powered by Social Strata 
Please Wait. Your request is being processed... 