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

DB2 Stored Procedures-unable to retrieve result-stes


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sat Jun 06, 2009 10:45 pm
Reply with quote

Hi Dick

I noticed the ATTACH statement in the beginning of the pre-compile. I came to a conclusion that the LINKEDIT step the last one, so that may not be a problem. If it is not working, the ATTACH(RRSAF) for the client program's JCL has to be modified. Let him respond....

Thanks for your response.

Regards
Raghu
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Sun Jun 07, 2009 2:30 pm
Reply with quote

Hi Dino,
I was not attaching RRSAF until i encountered this Error. As the explanation for the -981 suggested that the RRSAF connection may not be there. Hence i compiled the program and stored proc with ATTACH(RRSAF).

Raghu,
I link-edited the program as suggested by you.
Code:

//LKED.SYSIN  DD *                                                     
     INCLUDE SYSLIB(DSNELI,DSNTIAR)

but i encounter the SQLCODE -927.

Thanks for the response.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Mon Jun 08, 2009 3:43 pm
Reply with quote

Hi rahuindo

I think you have modified both the JCLs. Do not modify both. As I posted earlier, you just modify the JCL for Client program only. If you modify the SERVER program(STP) with DSNELI, you will get -927 sqlcode.

So make sure that you didn't modified both the JCLs.

For Server program -- use DSNRLI
For Client program -- use DSNELI.
For client program, you can avoid the use of ATTACH(RRSAF).

Post your resposnse.

Regards
Raghu
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Mon Jun 08, 2009 4:13 pm
Reply with quote

Hi Raghu,
I am now trying to invoke the SP thru DB2I and on executing the SP, i constantly encounter the SQLCODE -981. I figured out to some extent the DSNRLI is not getting linked to the SP even though i have coded "INCLUDE SYSLIB(DSNRLI)" in the link-edit step. I can see that execution of each SQL Statements calls are made to DSNHLI instead of DSNRLI. I suspect this may be the reason for the SQLCODE -981.
Can anyone suggest that how can i modify my SP so that the calls are made to DSNRLI and not DSNHLI?
Back to top
View user's profile Send private message
takamal

New User


Joined: 10 Apr 2009
Posts: 4
Location: chennai

PostPosted: Mon Jun 08, 2009 4:27 pm
Reply with quote

Hi '

please send application program using stored procedure.i want know how its work.with compiler change.

kamal

send my personal mail-id kamal.removed
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Jun 08, 2009 5:43 pm
Reply with quote

takamal wrote:
Hi '

please send application program using stored procedure.i want know how its work.with compiler change.

kamal

send my personal mail-id kamal.removed

A bit selfish, don't you think?
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Mon Jun 08, 2009 10:21 pm
Reply with quote

Yes Terry Heinze

I agree with you.

Raghu
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Jun 10, 2009 11:57 am
Reply with quote

Hi Guys,
Finally, i was able to solve the issue. I was in the assumption that the option "DYNAM" was the default in Changeman but it was just the reverse.
When i used the following compile options:
DYNAM, MAP,XREF, ATTACH(RRSAF)
i was able to solve the problem of SQLCODE -927 and -981.
Thanks a lot for all the support.
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: Thu Jun 11, 2009 4:13 am
Reply with quote

Good to hear it is working - thanks for letting us know icon_smile.gif

d
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts first column truncated in search result IBM Tools 13
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts executing XCTL command in COBOL witho... CICS 10
No new posts Invoke stored procedure via batch JCL. DB2 2
Search our Forums:

Back to Top