How CICS shared memory works?

烈酒焚心 提交于 2019-12-06 13:22:40

问题


I use EXEC CICS program control commands, LINK, XCTL, and RETURN in order to pass data between Cobol programm. The CICS shared memory get corrupted during one of my treatment. It seems that passed COMMAREA overwrite memory that not belong to CICS. To find why this problem occured I need to know better how CICS manage the shared memory when I use EXEC CICS program control commands. Does it copy COMMAREA or use pointer? Using nested EXEC CICS, how many COMMAREA are stored in the shared memory?

Configuration : I use Microfocus Net Express compiler and the environnement is UniKix.

PS : Check this question What can cause CICS transaction to write out of CICS allocated memory? if you know more about overwritting using EXEC CICS.


回答1:


Not sure about Net Express, but in CICS the commarea is accessed using a pointer.

So if program x LINKS to program y, any updates done to the commarea in y will be visible in x.

I gets worse if the Commarea definition in y is bigger than the definition in x - you could update variables after the commarea.

For XCTL, the commarea would be copied into a CICS control area and a pointer passed to the program



来源:https://stackoverflow.com/questions/9007731/how-cics-shared-memory-works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!