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.
I'm trying to make different selection critia based on report type. I've tested this out with the following CAR file code and I'm getting the following error message: 0 ERROR AT OR NEAR LINE 8 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC261) EXPRESSION IS INCOMPLETE BECAUSE AN OPERATION
Here's the code I'm trying to use:
-SET &RPT_TYPE = 'SELECTED';
TABLE FILE CAR
PRINT
CAR
MODEL
BODYTYPE
BY COUNTRY
-IF &RPT_TYPE EQ 'SELECTED' THEN GOTO OPT1 ELSE GOTO OPT2
-OPT1
WHERE COUNTRY EQ 'ENGLAND';
-GOTO FIN1
-OPT2
WHERE COUNTRY NE 'ENGLAND';
-GOTO FIN1
-FIN1
ON TABLE HOLD AS HCAR FORMAT FOCUS
END
Any help is appreciated. -Bethany WF 7.1.3
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
Bethany just a note to add to what Tim has already taught you. ALL your GOTO statements must end with a ; Any DM command ends in a ; A label, however, doesn't end with a ; Ending a focus IF or WHERE statement with a semi is something that must come from a new gui, it makes hand-coding developers freak, we'ld always leave it off. This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I don't recall ever using ; on -GOTO'S for the various platforms I've worked on over the years with FOCUS and WebFOCUS - but - I think it certainly can't hurt as long as the parser engine doesn't barf on it.
My guess is that since the GOTO DM command can only accept/expect one value (i.e. a label) following the command they don't require the semi-colon. Kind of like the -EXIT, -QUIT, etc DM commands.
To my knowledge, the semi colon has always been required to terminate the -GOTO. Previous versions may not have fallen when it was missing, but it has always been a required syntax.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Funny, in all my years of coding with Focus and WebFOCUS on various platforms, I've never put a semi colon after a -GOTO unless it's part of the -IF statement?????
WebFOCUS 7.6.6/TomCat/Win2k3
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
I have never used a semicolon after "-GOTO label" nor does the example in the documentation from "Creating Reports 5.3" page 25-30 or "Developing Reporting Applications 5.3" page 10-21
Syntax: How to Perform Unconditional Branching
-GOTO label . . . -label [TYPE text] page 10-58
Are there times when the semicolon is required? Does the use of the semicolon speed up processing?
You might alternatively try the DM .EVAL technique. I just learned of this about 6 months ago and have found it very useful, especially if I need several lines of code changes for the same basic TABLE request. This keeps your main code cleaner and easier to read/modify in the future. Also easier to follow.
-SET &RPT_TYPE = 'SELECTED'; -IF &RPT_TYPE EQ 'SELECTED' THEN GOTO ENG ELSE GOTO NOENG;
-ENG -SET &ENGLAND = 'WHERE COUNTRY EQ ''ENGLAND'''; -GOTO MAINTABLE
-NOENG -SET &ENGLAND = 'WHERE COUNTRY NE ''ENGLAND''';
-MAINTABLE TABLE FILE CAR PRINT CAR MODEL BODYTYPE BY COUNTRY &ENGLAND.EVAL ON TABLE HOLD AS HCAR FORMAT FOCUS ENDThis message has been edited. Last edited by: Robert B Clark,
Robert B. Clark -- Business Systems Analyst Daimler Trucks North America Phone: 503.745.7057 "There's always a better way." IBM Mainframe zOS 8.1.05, DB2 adapter WF 8.1.05 Hub to Sub, Self-Service, SQL Server adapter
Posts: 25 | Location: Portland, OR | Registered: October 13, 2006
I think people have to many EVAL cards in their back pocket! You don't need an EVAL for this piece of code.
I just tried it without and it worked just fine.
As for -GOTO requiring a semi-colon, I just scanned my arsenal of fexes and found that only 832 out of 6725 -GOTO statements had semi-colons (most of the programs that used a semi-colon I didn't write).
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
After questioning my sanity, I realised that I generally do not use a "-GOTO" on its own (I probably have but can't think of when ). I normally use it as part of a dialogue manager "-IF" statement. That MUST end with a semi colon and is probably why I would tend to use it every time.
So Tim's reply (also being the first) was spot on!
T
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004