Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COBOL /DB2 -805 3

Status
Not open for further replies.

dja1

Programmer
Apr 24, 2002
65
0
0
GB
I have a COBOL/DB2 Program - ProgramA, which calls a sub-program COBOL/DB2 Program - ProgramB.
both are compiled, linked, and bound using the same JCL, the only change is the program name.

Obviously, ProgramB is compiled, linked and bound before ProgramA

Program A does a "bit" of SQL - just to demonstrate that it doesn't get a -805;

EXEC SQL
SELECT 1
INTO :SV1G-NUMMOVD2
FROM SYSIBM.SYSDUMMY1
END-EXEC
MOVE SQLCODE TO WS001-SQLCODE
DISPLAY 'SQLCODE = ' WS001-SQLCODE ,

then calls ProgramB
CALL 'BPB0003' USING X003-PARAMETROS.

When ProgramA is executed, the first display that appears is "SQLCODE = 0", so it seems that ProgramA is O.K.

However, the display after BPB0003 is called shows a -805. Which I believe indicates that the Load Module and DB2 Package info. disagree.

Below are the bind parameters. Any ideas, anyone ?

//BINDPLAN EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM (DBD1)
BIND MEMBER (HARNESS2 ) -
PLAN (HARNESS2 ) -
LIBRARY ('DEA.SIPDAL.DBRMLIB' ) -
ACTION ( REPLACE ) -
ISOLATION ( CS ) -
VALIDATE (BIND ) -
RELEASE (COMMIT ) -
OWNER (DESADM ) -
QUALIFIER (DES01 )
END

//BINDPLAN EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM (DBD1)
BIND MEMBER (BPB0003 ) -
PLAN (BPB0003 ) -
LIBRARY ('DEA.SIPDAL.DBRMLIB' ) -
ACTION ( REPLACE ) -
ISOLATION ( CS ) -
VALIDATE (BIND ) -
RELEASE (COMMIT ) -
OWNER (DESADM ) -
QUALIFIER (DES01 )
END





 
The binding has to be done differently in a case like this. This is a matter to be taken up with your DBA.

If you want more detailed instruction, the forum below would be a better choice for the topic.

forum178

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Hi,
The first program does not include the 2nd in it's bind parms - there's no reference to it there at all so the first program's db2 side knows nothing about it.

You need to add
Code:
MEMBER(BPB0003)
to the first bind statement.

Hope this helps.
Marc
 
You can also get around this by making the call to the second program dynamic. You have this code as a static call.

to make dymanic in your working storage create:

05 ws-program pic x(08) value 'BPB0003'

and change you call to:

CALL WS-PROGRAM USING X003-PARAMETROS.

The good thing about this is that you can make changes to the BPB0003 program with having to re-compile all the calling programs also.
 
Possible problem is that the two program were bound to different plans.
There are other ways to do it, but most of the shops I worked with would bind programs on the same plan, having a different plan per environment.


BIND MEMBER (HARNESS2 ) -
PLAN (HARNESS2 ) - [/]
LIBRARY ('DEA.SIPDAL.DBRMLIB' ) -
ACTION ( REPLACE ) -
ISOLATION ( CS ) -
VALIDATE (BIND ) -
RELEASE (COMMIT ) -
OWNER (DESADM ) -
QUALIFIER (DES01 )
END

//BINDPLAN EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM (DBD1)
BIND MEMBER (BPB0003 ) -
PLAN (BPB0003 ) -
LIBRARY ('DEA.SIPDAL.DBRMLIB' ) -
ACTION ( REPLACE ) -
ISOLATION ( CS ) -
VALIDATE (BIND ) -
RELEASE (COMMIT ) -
OWNER (DESADM ) -
QUALIFIER (DES01 )
END

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top