Focal Point
Evaluating &RETCODE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5521092142

August 10, 2007, 03:50 PM
jmdoyl1
Evaluating &RETCODE
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
August 11, 2007, 12:20 PM
Jessica Bottone
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
August 13, 2007, 04:45 AM
hammo1j
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
August 13, 2007, 06:41 AM
hammo1j
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