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.
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,
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, 2007
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, 2010
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
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, 2005
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
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, 2010
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