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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Error Handling for SQL error

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Error Handling for SQL error
 Login/Join
 
Member
posted
Hi All,
can anyone please let me know how to handle the following error :SQLCODE IS -30081 (HEX: FFFF8A7F)
BTP1020 : [08001] [IBM][CLI Driver] SQL30081N A communication error has been dete
BTP1020 : cted. Communication protocol being used: "TCP/IP". Communication API be
BTP1020 : ing used: "SOCKETS". Location where the error was detected: "170.2.34.5
BTP1020 : 8". Communication function detecting the error: "selectForConnectTimeou
BTP1020 : t". Protocol specific error code(s): "0", "*", "*". SQLSTATE=08001
BTP1020 L (FOC1406) SQL OPEN CURSOR ERROR.
BTP1020 SQLCODE IS 1394 (HEX: 00000572)
BTP1020 : CONNECT FAILURE
BTP1020 L (FOC1405) SQL PREPARE ERROR.


I got this error but i have not handled the error in my webfocus report and want to handle so that in my code when ever i will get this error i want to exit without executiing rest of the code.

please suggest ASAP.


WebFOCUS 8
Windows, All Outputs
 
Posts: 14 | Registered: January 15, 2015Report This Post
Guru
posted Hide Post
Can't tell you what your error is, but you could put in a GOTO.

 -IF &FOCERRNUM NE 0 THEN GOTO ROUTINE_ERROR ;
 


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
The last FOC errorcode is available as &FOCERRNUM, so you can check whether that's non-zero and act accordingly.

An SQL PREPARE ERROR can have other causes of course, if you specifically want to catch connection timeout errors and nothing else that variable is not sufficient. I don't know what would be though.

You can also force your procedure to stop on errors using SET ERROROUT = ON. That setting is not without problems though (agent crashes!), so my advise is to use it sparingly and disable it when you're not in sections of code where it isn't relevant.

Some useful tricks:
-* Remember the current value of ERROROUT
-? SET ERROROUT &OLD_ERROROUT

-* Break on errors
SET ERROROUT = ON

-* Do stuff, querying an RDBMS for example

-* Check for errors
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO :ERRHNDLR;

-* Restore previous setting
SET ERROROUT = &OLD_ERROROUT


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Error Handling for SQL error

Copyright © 1996-2020 Information Builders