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
Error Page
 Login/Join
 
Guru
posted
Hello,

I want a generic HTML page returned when a focexec returns an error. Any idea how this can be accomplished?


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
...
END
-RUN
-IF &FOCERRNUM NE 0 GOTO FOCERROR;

...

-EXIT

-FOCERROR
-HTMLFORM BEGIN
your HTML here
-HTMLFORM END


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
I just have a fex that can check &FOCERRNUM, &RECORDS, or &LINES that I -INCLUDE at the end of most fexes.
for example:
-SET &OUTPUT='HTML';
-IF &FOCERRNUM EQ 0 THEN GOTO NOERROR;
-NOLINES
TABLE FILE CAR
PRINT CAR NOPRINT
HEADING
"There was an error generating this report."
WHERE READLIMIT EQ 1
ON TABLE SET ONLINE-FMT &OUTPUT
ON TABLE SET PAGE NOPAGE
END
-RUN
-NOERROR


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Guru
posted Hide Post
I tried the following and my error html page runs? I would expect it to exit before.

TABLE FILE CAR
PRINT *
END
-RUN
-IF &FOCERRNUM NE 0 GOTO FOCERROR;
-EXIT
-FOCERROR
-HTMLFORM BEGIN


Error Page


Were Sorry!


&FOCERRNUM The document you requested cannot be found.




-HTMLFORM END


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
Sayed, as Gerry says, WYSIWYC..you're getting exactly what you coded.
the focerrnum for this bit of code is 757
0(FOC757) WARNING. YOU REQUESTED PRINT * OR COUNT * FOR A MULTIPATH FILE
The PRINT * and COUNT * commands cause the left-most path in a file
to be referenced. If the file has more than one path, data which is
not part of the left-most path is not printed or counted.

Do your test again, with a code snipped where the &FOCERRNUM is truly 0.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
Hi Susannah,

I'm lost now. All I'm trying to do is send my users to a default error page if my code breaks on my PROD environment. I do not want them to see any FOC ERROR messeges.


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Guru
posted Hide Post
For example I'd expect this code to break and then go to my error page only

TABLE FILE CAR
printt *
END


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
Sayed,

This code will produce an error (check the source code within the HTML via context menu - right click)
TABLE FILE CAR
PRINT *
END
-RUN

This should not (unless you do not have the CAR file mas and foc in your path!!)
TABLE FILE CAR
PRINT COUNTRY
END
-RUN

The reason, as Susannah has already mentioned, is that the PRINT * against the CAR file would produce a selection against a multiple path and it has always been that FOCUS produces an internal error for this, even if it is a warning!

Your last example
TABLE FILE CAR
printt *
END
-RUN

Would produce a syntax error. This is not the only type of error you should be checking for.
Apart from the fact that, if you put code like that into your live environment, it would show a distinct lack of testing being done beforehand!!
Check for errors that could occur in live, such as file not found, EDA down, security error etc. etc.

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, 2004Report This Post
Guru
posted Hide Post
Thanks for the clarity Tony. So I can still have &FOCERRNUM NE 0 when my focexec runs and return a report?

I was expecting &FOCERRNUM EQ 0 whenever I get a report back otherwise trap the error and send users to a default error page.


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
when you have written your report imperfectly, yes you'll get a &FOCERRNUM >0. So be sure to TEST your reports to determine their &FOCERRNUM, and whether or not it is acceptable to you, before putting them in to production, if you plan to use &FOCERRNUM as a branching determinant.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
Thank You ALL for your suggestions. It has been a great help.


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders