Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Thu May 28, 2009 6:56 pm    Post subject: Got Sqlcode=-981 while calling from COBOL pgm to Stored Proc
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: 6968
Location: porcelain throne

PostPosted: Thu May 28, 2009 7:35 pm    Post subject:
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: 237

PostPosted: Thu May 28, 2009 9:20 pm    Post subject: Reply to: Got Sqlcode=-981 while calling from COBOL pgm to S
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: 6968
Location: porcelain throne

PostPosted: Thu May 28, 2009 10:11 pm    Post subject:
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: 237

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

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

Site Director


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

PostPosted: Fri May 29, 2009 7:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us