IBM Support

CICS standard mode Liberty JVM server JDBC T2 Thread not CICS-DB2 compatible CICS_REGION_BUT_API_DISALLOWED -4228

Question & Answer


Question

How to I get around the CICS_REGION_BUT_API_DISALLOWED error? I created a CICS standard-mode Liberty JVM Server and my Liberty messages.log shows the following FFDC when my application invokes DB2 with a JDBC Type 2 (T2) DataSource over SOAP.

 [8/30/17 17:07:55:870 EDT] 00000045 com.ibm.ws.logging.internal.impl.
 IncidentImpl                I FFDC1015I: An FFDC Incident has been
 created: "com.ibm.db2.jcc.am.SqlException: [jcc][50053][12310][4.19.56]
 T2zOS exception: [jcc][T2zos]T2zosCicsApi.checkApiStatus: Thread is not
 CICS-DB2 compatible: CICS_REGION_BUT_API_DISALLOWED ERRORCODE=-4228,
 SQLSTATE=null com.ibm.ws.rsadapter.spi.DB2JCCHelper 1298" at ffdc_17.
 08.30_17.07.55.0.log
 [8/30/17 17:07:55:904 EDT] 00000045 com.ibm.ws.logging.internal.impl.
 IncidentImpl                I FFDC1015I: An FFDC Incident has been
 created: "com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException:
 DSRA8100E: Unable to get a PooledConnection from the DataSource. with
 SQL State : null SQL Code : -4228 com.ibm.ejs.j2c.poolmanager.FreePool.
 createManagedConnectionWithMCWrapper 199" at ffdc_17.08.30_17.07.55.1.
 log
 [8/30/17 17:07:55:912 EDT] 00000045 com.ibm.ws.logging.internal.impl.
 IncidentImpl                I FFDC1015I: An FFDC Incident has been
 created: "javax.resource.spi.ResourceAllocationException: DSRA8100E:
 Unable to get a PooledConnection from the DataSource. with SQL State :
 null SQL Code : -4228 com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.
 getConnection 299" at ffdc_17.08.30_17.07.55.2.log

Answer

The "CICS_REGION_BUT_API_DISALLOWED" ERRORCODE is returned by CICS Transaction Server for z/OS (CICS TS) method IsCICS..getApiStatus if CICS determines the thread has not been CICS-enabled. When running in a CICS TS standard-mode Liberty JVM server, the CICSExectorServer runAsCICS method can be used to enable the JDBC T2 thread as a CICS thread so DB2 will allow the CICS DB2 attachement to connect.

This is scenario is described in CICS Developer Center blog CICS is now arriving at the Java EE 7 Full Platform.

The CICS TS V5.3 documentation also describes this for a non-HTTP ( for example, SOAP) JDBC T2 request in topic Threads and tasks example in this note:

Note: For non-HTTP requests in Liberty, a CICS task is created only when the first JCICS or JDBC DataSource with type 2 connectivity call is made.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"Liberty","Version":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICSTS CICS TS CICS Transaction Server

Document Information

Modified date:
09 October 2017

UID

dwa1405729