Troubleshooting
Problem
A job may fail with MCH3402 'tried to refer to all or part of an object that no longer exists' when the job is running a Cobol program where a dataarea is created and then deleted and recreated
Resolving The Problem
It is possible a job might get MCH3402 where a Cobol program is running and in that job a data area is created and deleted several times while the application is running. This is a problem because after COBOL's first access to the data area, it expects subsequent access of the data area will be to the exact same object at the same location - but deleting and recreating the data area means that the data area may not be at the same address, and in this case COBOL's attempt to access the data area will fail. The solution is to not delete the data area once it is in use by the application, until the application has completed. Instead, the data area should be cleared rather than deleted. One way to do this in CL would be to replace the DLTDTAARA command with the CHGDTAARA command, specifying that the length of the data area be filled with spaces. If this is not desirable, another possibility may be to immediately create the data area after deleting it, thus minimizing the chance that the data area would be created at a different address.
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p000000F98bAAC","label":"Programming ILE Languages-\u003ECOBOL"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
07 May 2025
UID
nas8N1020490