Gen client/server CSU-ERROR "Bad state" in getViewFromCFB()
search cancel

Gen client/server CSU-ERROR "Bad state" in getViewFromCFB()


Article ID: 269662


Updated On:


Gen Gen - Run Time Distributed


Facing the error while running a COM Proxy transaction from a web browser to remote Gen CICS server:
CSU-ERROR: Bad state detected in CICFBMsgBase::getViewFromCFB().

More details:
The server load module is the same in all the CICS regions.

When targeting the CICS REGION1 server, the transaction response shows an application error which is what is expected to be returned from the server to the client COM proxy i.e. the Proxy UI Message field shows: "ERR: Header userid required."

However, when targeting the CICS REGION2 server the transaction response at the client COM proxy shows:
CSU-ERROR: Bad state detected in CICFBMsgBase::getViewFromCFB().
The REGION2 CICS log shows that the expected message "ERR: Header userid required." was returned to the client.


Gen 8.6 client/server applications.


Capture CMIDEBUG trace files from successful and failing CICS REGION tests.

  • The successful CMIDEBUG trace file for the REGION1 server shows the message "ERR: Header userid required" is being returned and processed correctly as "ExitStateMsg=Processing Failed and Update Rolled Back". 
  • The failing CMIDEBUG trace file for the REGION2 server shows the same message "ERR: Header userid required" is being returned but it is not getting processed correctly. The message "Invalid common format datatype" is visible and also the final message being reported back to the client proxy i.e. "CSU-ERROR: Bad state detected in CICFBMsgBase::getViewFromCFB()".
  • Comparing extracts from failing and successful CMIDEBUG trace files, it would appear that the message buffer length being returned from the failing REGION2 (8762 bytes) is 184 bytes less than that being returned from the successful REGION1 (8946 bytes).
  • Although the servers on both regions are supposed to be the same, the above symptoms of return message bytes mismatch indicates there is likely a client<->server view mismatch on the export views between the server's COM proxy interface and the REGION2 Gen server itself.
  • That mismatch could occur if the COM proxy and server were generated at different times and in between those times the server's export views were changed.

To resolve the problem it was recommended that the z/OS admin back up the current Gen server module in REGION2 and copy over the version from REGION1. Then also use the CICS command "CEMT SET PROGRAM(module_name) NEWCOPY".
That was successful in resolving the problem.

Additional Information

  • This type of view mismatch problem could potentially occur for any type of Gen client/server application.
  • If the transaction is failing for all server instances then it would be advisable to regenerate/build both the Gen client (in this case COM Proxy) and the Gen server from the same model/subset to ensure that all generated code is synchronised with the model. Then ensure the new versions of both are correctly deployed before testing