Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us