Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Cobol/DB2 program calling REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
David Joyce

New User


Joined: 08 Aug 2008
Posts: 5
Location: Boulder Colorado

PostPosted: Sat Aug 09, 2008 1:41 am    Post subject: Cobol/DB2 program calling REXX
Reply with quote

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.
Back to top
View user's profile Send private message
References
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1