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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Evaluating &RETCODE
 Login/Join
 
Silver Member
posted
The question I have is related to the following message when a request is forced off by the DB2 Governor on UDB on AIX (DB2 on the mainframe, using the RLF, returns a -905). I want to trap the -30081 return code and not the -99999 code which is what is happing today.

-IF (&RETCODE LT 0) GOTO SQL_ERROR;
-*I get the -99999 in &RETCODE

(FOC1400) SQLCODE IS -30081 (HEX: FFFF8A7F)
: [40003] [IBM][CLI Driver] SQL30081N A communication error has been dete
: cted. Communication protocol being used: "TCP/IP". Communication API b
: eing used: "SOCKETS". Location where the error was detected: "xx.xxx.xx
: x.xx". Communication function detecting the error: "recv". Protocol sp
: ecific error code(s): "*", "*", "0". SQLSTATE=08001
(FOC1407) SQL FETCH CURSOR ERROR. : SQLOUT
(FOC1400) SQLCODE IS -99999 (HEX: FFFE7961)
: [40003] [IBM][CLI Driver] CLI0108E Communication link failure. SQLSTATE
: =40003
(FOC1408) SQL CLOSE CURSOR ERROR. : SQLOUT


WebFOCUS 7.1.3 Windows Client AIX 5.2 Report Servers
 
Posts: 39 | Registered: January 26, 2004Report This Post
Platinum Member
posted Hide Post
I'm afraid what you're seeing may be the typical behavior for the values in &RETCODE as well as &FOCERRNUM. From your post, I see two entries with a FOC1400. The first one showed the -30081 and the second one showed the value of -99999. Unfortunately, the values in these amper variables is the last value given, which in this case is the -99999. If I'm correct here, then I don't believe there is anyway for you to capture the -30081.


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Master
posted Hide Post
Can you prefix each request with a short db2 request that returns the required retcode and does not consume much resource.

Also there's a setting to pass sql return codes that you could check the setting of to see if it needs to be turned on.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Master
posted Hide Post
Another approach may be to set session monitor on (if this still works) save the output and then scan for the code that you want to look for.

Used to do this on FOCUS 5.5 so would be interested to see if it is still working!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders