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
 

 

DB2 stored procedure - getting sqlcode -805

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

New User


Joined: 15 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Fri Apr 09, 2010 12:09 pm    Post subject: DB2 stored procedure - getting sqlcode -805
Reply with quote

Hi,

I am getting sqlcode -805 after call to stored procedure from online main program.

I have created stored procedure program and created parm list entry in sysibm.sysparms table. And compile both main and stored procedure program and bound with test region qualifier (DBT29) and concatenated the load library with online Job CICSABC

I am calling stored procedure PGMSP from main program PGMA as below

EXEC SQL CALL SYSPROC.DBT29.PGMSP (:parm List)
END-EXEC.

But after this call i am getting sqlcode -805.
Please help me on this if have any idea.
Back to top
View user's profile Send private message

Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Fri Apr 09, 2010 12:11 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

1. Are you using the correct PLAN?
2. Did you get any error message while binding?
Back to top
View user's profile Send private message
pdp123

New User


Joined: 15 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Fri Apr 09, 2010 12:15 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

Hi,

1. I am using package to bind both main and SP program.
2. No error. Bind is successful for both Main And SP program.
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Fri Apr 09, 2010 12:35 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

Can you please check if there is a matching package in SYSPACKAGE? Use the following query:

Code:
                                             
 SELECT COLLID, NAME, HEX(CONTOKEN), VERSION 
 FROM SYSIBM.SYSPACKAGE       
 WHERE NAME = 'dbrm-name'                     
 AND HEX(CONTOKEN) = 'consistency-token';     
                                             


Use the below query if collection id is not balnk in your -805 message.

Code:


                                             
 SELECT COLLID, NAME, HEX(CONTOKEN), VERSION
 FROM SYSIBM.SYSPACKAGE     
 WHERE NAME = 'dbrm-name'                   
 AND HEX(CONTOKEN) = 'consistency-token'     
 AND COLLID = 'collection-id';               
                                             


If no rows are returned, the correct version of the package was not bound.
Back to top
View user's profile Send private message
pdp123

New User


Joined: 15 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Fri Apr 09, 2010 2:30 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

Hi,

I ran above query, i got the package version which is matching with load module and dbrm module version of stored procedure.

Thanks,
Pradeep
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Fri Apr 09, 2010 3:54 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

Pradeep

I believe you have to do a double bind for this problem. If you post your BINDCARD / PKO I will try if i can suggest anything. It is best if you consult your DBA on what changes you have to do for the double bind.
Back to top
View user's profile Send private message
pdp123

New User


Joined: 15 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Fri Apr 09, 2010 5:09 pm    Post subject: Reply to: DB2 stored procedure - getting sqlcode -805
Reply with quote

Hi Ranjith,

Bind card for stored procedure

Code:
BIND PACKAGE(SCOEL000) -
OWNER(DBDSCOP) -       
QUALIFIER(DBTSCOE) -   
MEMBER(SCOS0001) -     
CURRENTDATA(NO)-       
DBPROTOCOL(DRDA) -     
VALIDATE(BIND) -       
ISOLATION(UR) -         
FLAG(I) -               
PATH(DBTSCOE,SYSPROC) -
RELEASE(COMMIT) -       
EXPLAIN(YES);         


Bind card main pgm

Code:
BIND PACKAGE(SCOEL000) -
OWNER(DBDSCOP) -         
QUALIFIER(DBTSCOE) -     
MEMBER(SCO00012) -       
CURRENTDATA(NO)-         
DBPROTOCOL(DRDA) -       
VALIDATE(BIND) -         
ISOLATION(UR) -         
FLAG(I) -               
RELEASE(COMMIT) -       
EXPLAIN(YES);           


Thanks for your help. I will check with DBA here.

Thanks,
Pradeep
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 DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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