0

While running COBOL+DB2 program I am getting SQLCODE -981 SQLERRMC :00C12219. The program is link edited with INCLUDE SYSLIB(DSNELI).

What could be the possible reason I am gettibg -981?

link edited with INCLUDE SYSLIB(DSNELI).and RRSAF thread shows active.

mao
  • 11,321
  • 2
  • 13
  • 29
AK1222
  • 1
  • 1
  • 1
    Which Db2 version? Is it NFM? Is the Cobol program running also on Z/OS or on workstation? Otherwise, this is a programming forum, and unless you show your code, it's difficult to comment in any detail... – mao Apr 28 '19 at 18:31
  • Per IBM - DSNRLI, For explicit Db2 Resource Recovery Services Attach Facility connection service requests – Jim Castro Apr 29 '19 at 15:19

2 Answers2

0

IBM Documentation report this:

-981   THE SQL STATEMENT FAILED BECAUSE THE RRSAF CONNECTION IS NOT IN A STATE THAT ALLOWS SQL OPERATIONS, REASON reason-code.
Explanation
The application attempted to execute an SQL operation, but the RRSAF connection was not in a state that allows the processing of SQL statements.

System action
The statement cannot be processed.

Programmer response
Correct the error in the application, REBIND, and run the application again.

SQLSTATE
57015

So, try to check detail message, verify the reason code will help you to resolve the problem.

Nifriz
  • 1,033
  • 1
  • 10
  • 21
  • The reason code is "00C12219 " :The application program issued an SQL or IFI function request without completing CREATE THREAD processing. SQL or IFI requests cannot be issued until CREATE THREAD processing is complete. – AK1222 Apr 29 '19 at 20:43
0

Maybe it be a plan problem. Check it.