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
 

 

SQLCODE = -923/-927 in COBOL DB2 batch program

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

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Wed Oct 19, 2011 4:41 pm    Post subject: SQLCODE = -923/-927 in COBOL DB2 batch program
Reply with quote

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. icon_redface.gif

We tried to resolve this since a long time but not getting any clue. icon_evil.gif

Can any one help me to dig out this issue ?

Thank you in advance.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Oct 19, 2011 4:46 pm    Post subject: Reply to: SQLCODE = -923/-927
Reply with quote

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
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Wed Oct 19, 2011 4:56 pm    Post subject:
Reply with quote

sorry for the confusion.

It is failing always.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 19, 2011 5:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 19, 2011 5:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 19, 2011 6:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Wed Oct 19, 2011 7:30 pm    Post subject: Reply to: SQLCODE = -923/-927 in COBOL DB2 batch program
Reply with quote

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
View user's profile Send private message
Mithun MF

New User


Joined: 09 Sep 2010
Posts: 7
Location: Chennai

PostPosted: Wed Oct 19, 2011 10:27 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Thu Oct 20, 2011 10:27 am    Post subject:
Reply with quote

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
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Thu Oct 20, 2011 10:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Oct 20, 2011 7:31 pm    Post subject:
Reply with quote

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
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm


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