Hi All, Iam getting "(FOC224) SYNTAX ERROR: ( " error message While i use following code in 7.7.01 environment, it works fine in 7.6.2. Any Suggestions....
-SET &IFX2 = '(OR RO EQ '|'''FAIL'''|')';
Thanks, Krish.This message has been edited. Last edited by: FP Mod Chuck,
HI TOM, DID NOT WORKED.... HERE IS THE ERROR.. (FOC224) SYNTAX ERROR: (
Any Suggestions....
THANKS, KRISH.
WebFocus-8/Windows/HTML, PDF, EXCEL
October 12, 2010, 02:31 PM
Francis Mariani
If the result you're trying to achieve is exactly
quote:
(OR RO EQ 'FAIL')
try this:
-SET &IFX2 = '(OR RO EQ ''FAIL'')';
-TYPE &IFX2
The FOC224 error message means
quote:
There is a syntax error serious enough to halt interpretation.
which you can determine by executing
? 224
If what you posted is only an example, please post the real code.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 12, 2010, 03:06 PM
GamP
In my 7.7.01 environment I do not get an error message for this statement. I think there is something before this statement that causes the error message to appear. By the way, the code that Francis posted is indeed a bit better, because it is easier to read. The function and the outcome of both version of the statement is the same.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
October 12, 2010, 05:05 PM
Krishna.edara
Hi GamP here is my code what iam doing exactly,and iam getting error (FOC224) SYNTAX ERROR: (
-SET &IFX = 'WHERE (FI_TEST EQ '|'''FAIL'''|' OR CSTK_TEST EQ '|'''FAIL'''|')';
-SET &IFX2 = '(OR ML_TEST EQ '|'''FAIL'''|')';
-SET &IFLINE1=IF &LVL IS 'EXCEPT'
- THEN &IFX
- ELSE ' ';
-SET &IFLINE2=IF &LVL IS 'EXCEPT'
- THEN &IFX2
- ELSE ' ';
&IFLINE1
&IFLINE2
Thanks Krish.This message has been edited. Last edited by: Krishna.edara,
RETURNS WHERE (FI_TEST EQ 'FAIL' OR CSTK_TEST EQ 'FAIL') (OR ML_TEST EQ 'FAIL')
To put a single quote in dialog manager you need to use '''' this cannot be combined with the text that you want to quote so if you want 'SOMETHING' to appear in your statement it must be coded ''''|'SOMETHING'|''''
August 05, 2020, 04:54 PM
Kevin Patterson
Where is the -SET usage documented from IBI? I cannot find anything other than the most general help information in help menu in App Studio. We just upgraded and a lot of my code broke. I'd like to understand how -SET is supposed to be used now. I can't even find where to find what version I'm on.
More specifically what are those quotes? Are you using 4 single quotes? '''' or ""? Either way I'm still getting a syntax error.
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs
August 05, 2020, 06:19 PM
FP Mod Chuck
Kevin
Sometimes this can be tricky. Here is what is in the manual WebFOCUS Developing Reporting Applications
-SET assigns a literal value, or a value that is computed in an arithmetic or logical expression, to a variable. Single quotation marks around a literal value are optional unless it contains an embedded blank, comma, or equal sign, in which case you must include them. The syntax is: -SET &[&]name= {expression|value}; where: &name Is the name of a variable whose value will be set.
expression Is a valid expression. Expressions can occupy several lines, so end the command with a semicolon ;
value Is a literal value assigned to the variable. If the literal value contains commas or embedded blanks, you must enclose the value in single quotation marks. If the value contains a single quote, place two single quotes where you want one to appear.
In the examples from this very old post those are single quote marks. Sometimes you have to use 3 single quote marks on both sides I was surprised to see 4 in that example. The doc is very generic and you usually have to do trial and error until you find the right combination.
Post your code and we may be able to help you.This message has been edited. Last edited by: FP Mod Chuck,
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 06, 2020, 09:11 AM
Kevin Patterson
Chuck, Thank you that is very helpful. I never seem to find what I need in the manual.
I think I need to find information on valid expressions now. Here is the code: -SET &COUNTER=(&UNIQUE_ID.LENGTH/47); -TYPE &COUNTER; -SET &COUNTER = IF &COUNTER.EVAL EQ 0 THEN 1 ELSE &COUNTER.EVAL; -*This is for when we only have one unique ID passed in.
And here are the results: -SET &COUNTER=(33/47); -TYPE 0; 0; ERROR AT OR NEAR LINE 44 IN PROCEDURE ADHOCRQ (FOC224) SYNTAX ERROR:
-----------------------------------------v -SET &COUNTER = IF 0 EQ 0 THEN 1 ELSE 0; -*This is for when we only have one unique ID passed in. ***END RESULTS***
That line that has a syntax error appears, to me, to be what I want.
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs
August 06, 2020, 10:49 AM
dbeagan
The comment should be on its own line, start at the beginning of the line.
----------------------------------------v
-SET &COUNTER = IF 0 EQ 0 THEN 1 ELSE 0; -*This is for when we only have one unique ID passed in.
***END RESULTS***
WebFOCUS 8.2.06
August 06, 2020, 10:52 AM
Kevin Patterson
dbeagan,
That fixed that error! I of course have other unrelated errors further along in my fex that I'll work on now. I really, really, really appreciate your and Chuck's help.
Kevin Patterson Appalachian State University WebFOCUS 7.7.03 Windows, All Outputs