IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Got Sqlcode=-981 while calling from COBOL pgm to Stored Proc


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu May 28, 2009 6:56 pm
Reply with quote

Dear all,

I got SQLCODE=-981 with the following error message

DSNT408I SQLCODE = -981, ERROR: THE SQL STATEMENT FAILED BECAUSE THE RRSAF CONNECTION IS NOT IN A STATE THAT ALLOWS SQL OPERATIONS, REASON 00C12219 DSNT418I SQLSTATE = 57015 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNARA00 SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = 0 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION DSNT416 I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION.

while calling a Store Procedure from COBOL Program. I have called the stored procedure as typical COBOL-DB2 Program as shown below
Code:


CALL WS-XYZ USING WS-L055-CRDORG-NAME
                       WS-L055-CRDORG-ALT 
                       WS-L055-CRDORG-ID   
                       WS-L055-OUT-CODE   
                       WS-L055-ERROR-MSG   
                       WS-L055-IND.       


where XYZ is an stored procedure. Will it be the problem causing to -981? Please explain and give your valuable inputs to resolve this issue.

Thanks,
Murali.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 28, 2009 7:35 pm
Reply with quote

The Stored Procedure has been generated as requiring RRSAF type of attach.
Your CALLing program has not invoked an RRS connection with db2
or
the SP invocation methodology has not included an RRS connection.

I don't know which. Is this a MQS-DB2 application?
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu May 28, 2009 9:20 pm
Reply with quote

Can you please pitch it more on RRS?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 28, 2009 10:11 pm
Reply with quote

READ about RRS here
ABCs of z/OS System Programming Volume 5

AND

READ abour RRS here
DB2 9 for z/OS Stored Procedures: Through the CALL and Beyond
or
DB2 for z/OS Stored Procedures: Through the CALL and Beyond

What Does your application deal with besides DB2? MQS?, IMS?
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Fri May 29, 2009 9:56 am
Reply with quote

It deals with DB2 Stored Procedures.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 29, 2009 7:29 pm
Reply with quote

Hello,

Quote:
It deals with DB2 Stored Procedures.
Is this a question or a reply?

Posting a clear reply is more important than posting a brief reply. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top