View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
Hi,
We have a COBOL-DB2 batch program having one or more subprograms in it accessing DB2 tables. We have loaded all the required DB2 tables in one specific/dedicated region and also bound the necessary plans.
But while executing this batch job with proper SSID and PLAN NAME, our job is failing continuously due to -923 or -927 i.e. DB2 interface/DB2 connection issues.
We are trying to browse/edit tables through FILE-AID option for DB2, its giving us connection in this case but not when we execute query from our program. Even if we put the queries from our program in to SPUFI, then also it executes.
We tried to resolve this since a long time but not getting any clue.
Can any one help me to dig out this issue ?
Thank you in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
our job is failing continuously |
???
just choose to clarify the language barrier
1) always
2) most of the times
3) some of the times |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
sorry for the confusion.
It is failing always. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
had this issue occured yesterday,
i could understand why you have made little headway.
but,
since it has been for a long time,
and the issue is a connection issue
ONLY IN BATCH
either your invokation procedure is not correct.....what is it?
or you have not proper linked/steplib'd the proper DSNSL??? modules.
what are your steplib dsn's? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
do you have anything at your site that does work?
if so,
start comparing.
start with the pre-compiler option (TSO, etc...)
then the syslnin libraries
then the steplib for execution
then the EXEC parm in your job..... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Suggest you talk with your DBA. File-Aid for DB2, SPUFI and "user written COBOL DB2 program" are different animals. If you are able to access the tables using File-Aid or SPUFI - that does not guarantee that you've done all the set-ups correct from COBOL-DB2 program per se.
At one of the shops, a DB2 Stored-procedure was giving -927, the schema looked correct - everything fine, the way you said but then from DBA end they needed to add some "check" in some in-house screen - well, such things can't be answered via a Forum...check for such possibilities too. |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
Thank you all for you inputs.
1. Yes, we had few such jobs which executed before this unsuccessful job without any severe issue. Only difference was that, those tables were in different region and had different plan names, SSID etc.
2. Also we compared this unsuccessful job with those which went on right.
All load libraries for programs/subprograms/PLAN etc are right.
3. Again, will review the things and will contact DBA in case if does not work at all.
I have a doubt --
Is this anything related to improper binding ? |
|
Back to top |
|
|
Mithun MF
New User
Joined: 09 Sep 2010 Posts: 7 Location: Chennai
|
|
|
|
Hello Roshan,
I have came across this kind of issue.
1. Are you executing job has the BMC
2. The Main program has the static/dynamic calls for the subroutine.
If your subprogram is dynamic call then use 'cbl dynam' statement before the identification division.
If your subprogram is static call then link your subprogram with NCAL. Hope this resolve your issue.
Thanks,
Mithun |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
Thanks mithun,
I have tried all the possible inputs provided.
We cant modify the program as it is production one.
So, i guess this problem is related to 'invoking way to DB2' while calling SQL from cobol-db2 batch program as it fails at first query fire itself.
OR
something is wrong with BIND.
Also BIND was successful, so we are more confused.
Error is still there with -927 SQLCODE. |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
this is the job step where it is failing while calling first SQL:
please let me know if we are going wrong some where
Code: |
//STEP030 EXEC PGM=IKJEFT1B,
//PARM=('%DB2BATCH','SYS(&SSID)','PROG(PGMNAME)',
// 'PLAN(PLANNAME')
//STEPLIB DD DSN=&BASEBB.LOAD,DISP=SHR
// DD DSN=&BASECW.LOAD,DISP=SHR
// INCLUDE MEMBER=&DB2INCL
//SYSPROC DD DSN=PGDF.BASE.CLIST,DISP=SHR
//MERGEXTR DD DSN=&&MGEXTR,DISP=(OLD,DELETE)
//CUSTKEYS DD DSN=&&CUSTKEYS,DISP=(OLD,DELETE)
//EXTRFILE DD DSN=NEWFILE,
// DISP=(NEW,CATLG,DELETE),RECFM=FB,
// LRECL=1200,DATACLAS=&DCLAS
//XIOSTAT1 DD SYSOUT=*
//VIOSTAT1 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSABOUT DD SYSOUT=C
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
|
Let me try by providing control card in SYSTIN DD --- with RUN |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
We cant modify the program as it is production one. |
Nonsense. . . The most modified code in the world is production code. . .
If it is broken, it needs to be fixed.
As an expirement, you might clone this program to another name and re-do everything (compile/link/bind/etc) and see if the new code works properly or has the same problem. |
|
Back to top |
|
|
|