Please help!! I have a Cobol/DB2 program which calls a REXX program. This part of the process works fine. I encounter an error(-924, SQLSTATE 58006, reason-code 00F30049) when the REXX attempts to attach to the DB2 subsystem(Address DSNREXX "CONNECT" DBST). The reason-code states "A request was received to connect the requester's TCB to a DB2 subsystem, but the TCB is already connected."
So my next step was to comment out the CONNECT since the TCB was already connected. The next SQL statement is the DECLARE of the cursor which works fine but when the program tries to PREPARE the SQL statement I get an error(-981, SQLSTATE 57015, reason-code 00C12219).
This error refers to RRSAF not being in a proper state and not having executed a CREATE THREAD in the REXX prior to trying to execute the PREPARE. I am not quite sure where to go from here, how do I perform the CREATE THREAD so the RRSAF facility is in the proper state so I can execute SQL statements in my REXX?
Thanks for any help.
So my next step was to comment out the CONNECT since the TCB was already connected. The next SQL statement is the DECLARE of the cursor which works fine but when the program tries to PREPARE the SQL statement I get an error(-981, SQLSTATE 57015, reason-code 00C12219).
This error refers to RRSAF not being in a proper state and not having executed a CREATE THREAD in the REXX prior to trying to execute the PREPARE. I am not quite sure where to go from here, how do I perform the CREATE THREAD so the RRSAF facility is in the proper state so I can execute SQL statements in my REXX?
Thanks for any help.