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
 

 

Cobol-Db2 program calling cobol-DB2 subroutine SQLcode=-805

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
neelus.s

New User


Joined: 05 Apr 2007
Posts: 4
Location: Minneapolis

PostPosted: Sun May 06, 2007 4:40 am    Post subject: Cobol-Db2 program calling cobol-DB2 subroutine SQLcode=-805
Reply with quote

Hi all,

I am calling a COBOL-DB2 Subroutine in a cobol-DB2 program. I have bind both the elements. But while running the program, i am getting SQLcode = -805 while calling teh subroutine.
Please help me.

Regards,
Neelima
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: Sun May 06, 2007 5:05 am    Post subject:
Reply with quote

Hello and welcome to the forums icon_smile.gif

Please check and make sure both program names are spelled correctly when named in the plan.

Are these new programs? If they are not new, what was changed since the past time they worker correctly?

This was from a previous topic:
Quote:
The packages for all DB2 programs
executed under a Tran ID or batch job step must be included in collection
bound into this plan. When the first SQL statement of each program is
executed, DB2 searches the collections within the plan using the package name
and consistency token from the load module. If an exact match is not
found, a -805 SQLCODE is returned.


If you search in the forums, you may often find an answer and save yourself some wait time.

Good luck and we're here when there are questions.
Back to top
View user's profile Send private message
neelus.s

New User


Joined: 05 Apr 2007
Posts: 4
Location: Minneapolis

PostPosted: Sun May 06, 2007 3:07 pm    Post subject:
Reply with quote

Hi,

These are brand new programs.. I need the steps for compiling and binding of these programs...

need help asap

Neelima
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: Sun May 06, 2007 10:22 pm    Post subject:
Reply with quote

Hello,

Your best way to get the jcl you need is to talk with people at your organization (other developers, dba's, system support people).

While these are new programs, there have been programs compiled before now (unless you are in the very rare situation of being the only person who has ever needed to compile) and there should be standard compile jcl available.

Developers should not create, clone, or download compile/link jcl - in-house jcl should be used.

Once you have gotten your site's compile jcl, and there are questions, we're here. icon_smile.gif
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Mon May 07, 2007 9:02 am    Post subject:
Reply with quote

Hello,

I can offer two ways to resolve this problem. if you are using Changeman, Promoting tend to fix all -805 SQL Code errors.
If promoting does not resolve the problem, create the bind plan and package plan and stage and promote these as well including the programs.
You have to create these for each of the programs. This will work if you have Changeman.

If you do not have Changeman, you will probably use panel compile for compiling. You can create the bind plan and package plan. When compiling put the pds containing the package plan in Package Lib.
Put in any pds for DBRM lib. Usually you want a PDS containing all DBRMs
of other programs. You can then compile normally like any other COBOL-DB2 program. Do this for both calling and called programs.

A bind plan look like this:

BIND PLAN (CPSISH01) --> prog name + -->cont char
MEMBER (CPSISH01) --> prog name +
OWNER (DBTPFPT) --> table qualifier +
ACTION (REPLACE) +
VALIDATE (BIND) +
ISOLATION (CS) +
RELEASE (COMMIT) +
EXPLAIN (NO) +
CURRENT DATA (NO) +
RETAIN
END

A package plan look like this:

BIND PACKAGE (PFPTLB00) --> package name +
MEMBER (CPSISH01) --> prog name +
OWNER (DBTPFPT) -> qualifier +
QUALIFIER (DBTPFPT) -> qualifier +
SQLERROR (NO PACKAGE) +
VALIDATE (BIND) +
ISOLATION (CS) +
RELEASE (COMMIT) +
EXPLAIN (YES) +
ACTION (REPLACE) +
END
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm


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