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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Sun May 06, 2007 5:05 am
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
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

Moderator Emeritus


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

PostPosted: Sun May 06, 2007 10:22 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top