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
 

 

CICS DB2 program abended with SQL CODE -927

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

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Oct 18, 2011 1:24 pm    Post subject: CICS DB2 program abended with SQL CODE -927
Reply with quote

I have a CICS program A which calls a subprogram B, and B contains SQL statement.
but when I issue the transaction, it abended with SQL CODE -927.

I have searched the reason for -927 from SQL codes manual, but I still cannot find where the problem lies, as I think the plan can be associated with the transaction via the definition of DB2TRAN.
Would you please tell me more possible place where I missed? Thanks in advance!

by the way, I have successfully installed all the resources, including two programs (a main and a subprogram), a transaction, and a DB2TRAN.
Back to top
View user's profile Send private message

dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Oct 18, 2011 1:29 pm    Post subject:
Reply with quote

the following is my resource definition details:

tran:
Code:
I TRAN(JETD)                                                 
STATUS:  RESULTS - OVERTYPE TO MODIFY                         
 Tra(JETD) Pri( 001 ) Pro(DBIOCICS) Tcl( DFHTCL00 ) Ena Sta   
            Prf(DFHCICST) Uda Bel Iso               Bac Wai   
                                                             

programs: (DBIOCICS calls DBIOSAMP)
Code:
I PROGRAM(DBIO*)                                                   
STATUS:  RESULTS - OVERTYPE TO MODIFY                               
 Prog(DBIOCICS) Leng(0000006344) Cob Pro Ena Pri     Ced           
    Res(000) Use(0000000007) Bel Uex Ful Qua Cic               Len 
 Prog(DBIOSAMP) Leng(0000055824) Cob Pro Ena Pri     Ced           
    Res(000) Use(0000000007) Bel Uex Ful Qua Cic               Len 


DB2TRAN:
Code:

I DB2TRAN(JETD)                                                       
STATUS:  RESULTS - OVERTYPE TO MODIFY                                 
 Db2t(JETD    ) Db2e( DTLENTRY ) Tra( JETD ) Plan(TESTPLAN)           
                    Installt(10/18/11 15:46:45) Installu(CICS2   ) Csd


DB2entry:
Code:
I DB2ENTRY(DTLENTRY)                                         
STATUS:  RESULTS - OVERTYPE TO MODIFY                       
 Db2e(DTLENTRY)     Use Ena Poo Hig Pro( 0000 ) Pth(0000)   
    Threadl( 0000 ) Threads(0000) Tpo Plan( TESTPLAN )       

DB2CONN:
Code:

I DB2CONN                                 
STATUS:  RESULTS - OVERTYPE TO MODIFY     
  Db2conn                                 
  Accountrec( None )                     
  Authid( IBMUSER  )                     
  Authtype(              )               
  Comauthid(          )                   
  Comauthtype( Cuserid )                 
  Comthreadlim( 0001 )                   
  Comthreads(0000)                       
  Connecterror( Sqlcode )                 
  Connectst( Connected )                 
  Db2groupid(      )                     
  Db2id( DBA3 )                           
  Db2release(1010)                       
  Drollback(Rollback)                     
  Msgqueue1( CDB2 )                       
  Msgqueue2(      )                       
  Msgqueue3(      )                       
  Nontermrel( Release )                   
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Oct 18, 2011 2:58 pm    Post subject:
Reply with quote

In my experience -927 happens when you have an incorrect link-edit of the application. The correct DB2 module must be link-edited with the application - e.g. for IMS applications, DB2 is resolved by the DFSLI000 module from RESLIB; for CICS applications you require the DSNCLI module from SDFHLOAD. Batch propgrams will need the DB2-supplied modules.

Garry.
Back to top
View user's profile Send private message
Mithun MF

New User


Joined: 09 Sep 2010
Posts: 7
Location: Chennai

PostPosted: Thu Oct 20, 2011 3:49 am    Post subject:
Reply with quote

Hello..

You have mentioned that main program calls the subroutine..
Does the subroutine is static/Dynamic.

All CICS programs should call the subroutines/Subprogram in static not in Dynamic.
Also, the Subprogram shhould be linkedited with NCAL.

Please let us know your result.

Thanks,
mithun
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

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

After a lot of test, I found that a subprogram which contains SQL statement have to be compiled separately , one for CICS and one for TSO . One module containing SQL statement cannot be called by both CICS and TSO.

Am I right?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

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

Mithun MF wrote:


All CICS programs should call the subroutines/Subprogram in static not in Dynamic.


I'm afraid you are wrong on this point.
CICS program can call subprograms either in static mode or in dynamic mode.

My subprogram is meant to be called dynamically.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Oct 20, 2011 11:38 am    Post subject:
Reply with quote

dejunzhu wrote:
After a lot of test, I found that a subprogram which contains SQL statement have to be compiled separately , one for CICS and one for TSO . One module containing SQL statement cannot be called by both CICS and TSO.

Am I right?


Yes, the 'stub' routines provided for DB2 access in CICS are different from those in other environments - as in my earlier post.

Garry.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Oct 20, 2011 11:52 am    Post subject:
Reply with quote

Garry Carroll wrote:

Yes, the 'stub' routines provided for DB2 access in CICS are different from those in other environments - as in my earlier post.

Garry.


Thank you for your kind reply.
but there is one more question:
As CICS program and TSO program are both using the same plan, how can I bind the DBRMs produced by two separate compile jobs into two individual packages within the same collection?

I looked into the DB2 manual, and find the version of a package comes from DBRM itself, but when I bind the package for TSO program, CICS program abended with SQL error code '-805' and vice versa.

Can you please give me some idea on this: the same collection, the same package name (Package name=DBRM name=LOAD MODULE name), just different version.

Thanks.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Oct 20, 2011 12:18 pm    Post subject:
Reply with quote

I'm not certain, but it seems to me that the issue is with the fact that you have separate compiles which produce separate DBRMs. Can you try a single compile with two linkedits - one for CICs and the other for TSO?

Garry.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Oct 20, 2011 2:50 pm    Post subject:
Reply with quote

YES, thanks, Garry,

I tested, and the method you provided works!!!
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Oct 20, 2011 3:04 pm    Post subject:
Reply with quote

You're welcome - glad I could help! Thanks for letting us know it worked.

Garry.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
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 IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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