"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 11/29/2017 11:16:41
Are you guys saying that I am fighting with a known problem and it isn't
just something that I'm doing wrong?
No. Our situation is different from yours. Our situation is that
there is an off-platform call from MS SQL Server to a stored procedure on
the IBM i. If only one of these calls are made and then the session is
disconnected then everything works fine. However, if there are two of
these calls back-to-back in the same session then the second call was
failing due to an IBM i system message which stated that an object was no
longer available to be referenced.
At that point my SQL standard error service procedure would try to
log the error but would fail with another IBM i system message which
stated that there was no database connected. If I would try to connect
the local database (via CONNECT RESET) that would also fail with an IBM i
system message stating that the database was in an unconnectable state.
Thus Dieter's suggestion to use a separate activation group for my
SQL standard error service procedure seemed to be a good one -- because it
should always have the local database connected by default. But it still
failed. IBM stated that the server job for such connections (QZDASOINIT)
would have some kind of a reset performed on it between calls from MS SQL
Server. It appeared to be that this reset is what was messing me up --
but they had no suggestions on how to resolve the problem.
I did have your situation under another circumstance, though. In
that situation I had to add the CONNECT RESET to my SQL standard error
service procedure and that took care of it. When I moved my SQL standard
error service procedure to its own activation group then I was able to
remove the CONNECT RESET and everything continued working just fine in
this situation that was similar to yours.
In short... Your situation should be resolved by either using
CONNECT RESET or by moving the failing program to its own activation
group. If neither of those suggestions resolve your situation, then it
seems to me that it is PMR time.