|
View previous topic :: View next topic
|
| Author |
Message |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
 |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1217 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
Mithun MF
New User
Joined: 09 Sep 2010 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
 |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
 |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
| 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 |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1217 Location: Dublin, Ireland
|
|
|
|
| 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 |
|
 |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
| 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 |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1217 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
dejunzhu
Active User

Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
YES, thanks, Garry,
I tested, and the method you provided works!!! |
|
| Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1217 Location: Dublin, Ireland
|
|
|
|
You're welcome - glad I could help! Thanks for letting us know it worked.
Garry. |
|
| Back to top |
|
 |
|
|