There is a problem with a DB2 COBOL program.
This program has a cursor to read a Db2 table. The first read of the table goes on fine.
The subsequent reads also go on fine as long as the call to another program is skipped.
If however, the other program is called, the next fetch from the table (cursor) in the main program fails with SQL code of -805.
This -805 SQL code occurs only if the other program is called.
Along with the SQL code of -805, the following details are being set:
SQLCAID > SQLCA
SQLCABC > +000000136
SQLCODE > -000000805
SQLERRML > +0046
SQLERRMC > N090DSN..E8...&...0004500C022CF339.E8785EMQ.03
SQLERRP > DSNXEPM
SQLERRD > -000000250, +000000000, +000000000, -000000001, +000000000
E8785EMQ is the plan name. We use packages for binding with the plan.
We checked the contoken between DBRM and SYSIBM.SYSPACKAGE. They are matching.
Please help us to fix this issue. We tried rebinding several times. But still the issue is coming up.