IBM Support

DFHSM0102 Storage violation code 030B when using a COMMAREA

Troubleshooting


Problem

You receive message DFHSM0102 A storage violation (code X'030B') has been detected by module DFHSMGF. You are passing data between application programs by specifying a communication area (COMMAREA) on an EXEC CICS LINK, XCTL, or RETURN command.

Cause

The length of the COMMAREA in the receiving program is longer than the length of the COMMAREA being passed. The receiving program is overwriting data outside the area that has been passed. The program might also be attempting to read data outside the area.

The program issuing the LINK command determines the length of the COMMAREA. The GETMAIN done by CICS on behalf of the linked-to program is based on what was received with the command. The definition for the DSECT in the LINKAGE section of the linked-to program is not taken into consideration when the storage is acquired. Thus, when the linked-to program tries to initialize storage for what it believes to be the length of the COMMAREA a storage violation, overlay of trailing check zone, occurs when the length passed in the LINK command is less than the length of the DSECT in the target program. This also applies to programs doing XCTL or RETURN commands.

Resolving The Problem

Do the following as documented in the CICS Transaction Server documentation under COMMAREA:

The receiving data area can the same length as, or shorter than, the original communication area, but must not be longer. If access is required only to the first part of the data, the receiving data area can be shorter. If the receiving data area is longer than the original communication area, your transaction might attempt to read data outside the area that has been passed. It might also overwrite data outside the area, which might cause CICS® to abend.

To avoid this happening, your program should check whether the length of any communication area that has been passed to it is as expected, by accessing the EIBCALEN field in the EIB of the task. If no communication area has been passed, the value of EIBCALEN is zero. Otherwise, EIBCALEN always contains the value specified in the LENGTH option of a LINK, XCTL, or RETURN command, regardless of the size of the data area in the invoked program. Ensure that the value in EIBCALEN matches the value in the DSECT for your program, and ensure that your transaction accesses data in that area.

You can also add an identifier to COMMAREA as an additional check on the data that is being passed. This identifier is sent with the sending transaction and is checked for by the receiving transaction.

[{"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Storage","Platform":[{"code":"PF035","label":"z\/OS"},{"code":"PF038","label":"z\/VSE"}],"Version":"1.1.1;2.1;4.1;4.2;5.1;5.2;5.3","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICS TS CICS Transaction Server z/OS VSE/ESA

Document Information

Modified date:
15 June 2018

UID

swg21177909