Troubleshooting
Problem
Receiving message SQL0900 with RPGSQL program connecting to a remote database.
Resolving The Problem
Receiving message SQL0900 with RPGSQL program connecting to a remote database.
Customer had an external stored procedure associated with a RPGSQL program. This program issued a SQL CONNECT to a remote database. The Stored Procedure was invoked from a JDBC connection (QZDASOINIT). The first call to the Stored Procedure was always successful. Any subsequent call to the stored procedure from the same job results in the following:
SQL0900 Diagnostic 30 02/03/11 13:34:38.118830 QSQROUTS QSYS *STMT QSQROUTS QSYS *STMT
From user . . . . . . . . . : FLPDER
From module . . . . . . . . : QSQCLNUP
From procedure . . . . . . : SQROUTE_CLEANUP
Statement . . . . . . . . . : 3945
To module . . . . . . . . . : QSQCLNUP
To procedure . . . . . . . : SQROUTE_CLEANUP
Statement . . . . . . . . . : 3945
Message . . . . : Application process not in a connected state.
Cause . . . . . : One of the following occurred: -- The current connection
was disconnected using the DISCONNECT statement. -- The current connection
was released and a commit occurred. -- A previous error has left the
application process in an unconnected state. Use the Display Job Log
(DSPJOBLOG) command to see previous errors. Recovery . . . : Issue
CONNECT statement with the TO or RESET clause or the SET CONNECTION
The procedure was called from iNavigator Run SQL Scripts as follows:

Resolution:
Customer had the RPGSQL program compiled with default option of ACTGRP(*CALLER). The SQL Reference explains that this will result in message SQL0900.
Customer recompiled the RPGSQL program associated with their external stored procedure with ACTGRP(*NEW). When it does the DISCONNECT, the activation group it runs in is marked as being in an unconnected state.
DB2 for i SQL Reference manual:
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzcftbe.htm
Customer had an external stored procedure associated with a RPGSQL program. This program issued a SQL CONNECT to a remote database. The Stored Procedure was invoked from a JDBC connection (QZDASOINIT). The first call to the Stored Procedure was always successful. Any subsequent call to the stored procedure from the same job results in the following:
SQL0900 Diagnostic 30 02/03/11 13:34:38.118830 QSQROUTS QSYS *STMT QSQROUTS QSYS *STMT
From user . . . . . . . . . : FLPDER
From module . . . . . . . . : QSQCLNUP
From procedure . . . . . . : SQROUTE_CLEANUP
Statement . . . . . . . . . : 3945
To module . . . . . . . . . : QSQCLNUP
To procedure . . . . . . . : SQROUTE_CLEANUP
Statement . . . . . . . . . : 3945
Message . . . . : Application process not in a connected state.
Cause . . . . . : One of the following occurred: -- The current connection
was disconnected using the DISCONNECT statement. -- The current connection
was released and a commit occurred. -- A previous error has left the
application process in an unconnected state. Use the Display Job Log
(DSPJOBLOG) command to see previous errors. Recovery . . . : Issue
CONNECT statement with the TO or RESET clause or the SET CONNECTION
The procedure was called from iNavigator Run SQL Scripts as follows:

Resolution:
Customer had the RPGSQL program compiled with default option of ACTGRP(*CALLER). The SQL Reference explains that this will result in message SQL0900.
Customer recompiled the RPGSQL program associated with their external stored procedure with ACTGRP(*NEW). When it does the DISCONNECT, the activation group it runs in is marked as being in an unconnected state.
DB2 for i SQL Reference manual:
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzcftbe.htm
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHtAAM","label":"Programming ILE Languages"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
590090188
Was this topic helpful?
Document Information
Modified date:
15 July 2024
UID
nas8N1011711