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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] -Set Error
 Login/Join
 
Platinum Member
posted
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,


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Expert
posted Hide Post
quote:
-SET &IFX2 = '(OR RO EQ '|'''FAIL'''|')';


Works in 7.6.10; here's one way:

  
-SET &QT   = '''';
-SET &IFX2 = '(OR RO EQ '| &QT | 'FAIL' | &QT |')'; 
-TYPE &IFX2
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
HI TOM,
DID NOT WORKED....
HERE IS THE ERROR..
(FOC224) SYNTAX ERROR: (

Any Suggestions....

THANKS,
KRISH.


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
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,


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Virtuoso
posted Hide Post
quote:
-SET &IFX2 = '(OR ML_TEST EQ '|'''FAIL'''|')';

I think that should be
-SET &IFX2 = 'OR (ML_TEST EQ '|'''FAIL'''|')';


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Hi GamP
It did worked....
Thanks,
Krish.


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Member
posted Hide Post
-SET &IFX = 'WHERE (FI_TEST EQ '| ''''|'FAIL'|''''|' OR CSTK_TEST EQ '|''''|'FAIL'|''''| ')' ;
-SET &IFX2 = '(OR ML_TEST EQ '|''''|'FAIL'|''''|')';
-TYPE &IFX
-TYPE &IFX2

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'|''''
 
Posts: 17 | Location: Colorado, USA | Registered: January 22, 2010Report This Post
Gold member
posted Hide Post
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
 
Posts: 57 | Registered: February 29, 2012Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Gold member
posted Hide Post
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
 
Posts: 57 | Registered: February 29, 2012Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Gold member
posted Hide Post
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
 
Posts: 57 | Registered: February 29, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders