MCH3402: Object no longer exists
MCH3402 (Tried to refer to all or part of an object that no longer exists) means a job on IBM i used a pointer to an object that has been deleted since the job found it. Deleting a program while jobs still use it is the classic cause.
Other names for this code
Also written as MCH3402 error, MCH3402 object no longer exists, tried to refer to all or part of an object that no longer exists, MCH3402 recompile, MSGID MCH3402.
What it means
When a job calls a program or opens an object, it resolves the name once and keeps a pointer to the object for later use. If someone then deletes that object, the pointer still exists but points at nothing. The next time the job uses it, the machine sends MCH3402.
Recompiling is where most people meet it. IBM's support note explains that jobs which already called a program keep using their pointer to the old version after a recompile. That works as long as the old program still exists somewhere. Compiling with REPLACE(*YES) moves the old version to library QRPLOBJ, so running jobs keep working. Deleting the program first and then compiling it removes the old version for good, and every job holding a pointer to it gets MCH3402 on its next call.
IBM also describes a less common path. If QRPLOBJ is full, the old version goes to QTEMP of the job that did the compile instead. When that job ends, its QTEMP is deleted, and so is the old program.
Common causes
- A program was deleted (
DLTPGM) and then recompiled while other jobs were using it. - QRPLOBJ was full during a
REPLACE(*YES)compile, so the old version went to the compiling job's QTEMP and disappeared when that job ended. - An object a job had located earlier, such as a data area, a user space or a file, was deleted and re-created by another job while the first job still held its pointer.
How to find the problem
- Run
DSPJOBLOGon the failing job, put the cursor on MCH3402 and press F1, then F9. Note the program and statement that used the old pointer. - Find out what that statement refers to, usually a called program, and check when that object was last changed or re-created with
DSPOBJD. - Check with whoever promoted code at that time whether the object was deleted before compiling, or whether a deployment tool replaced it that way.
- Look at the library QRPLOBJ with
DSPLIBto see whether it is very full.
How to fix it
- End and restart the affected job, or have the user sign off and on. A new job resolves the name again and finds the new object.
- Compile with
REPLACE(*YES)instead of deleting first, so running jobs keep the old version until they finish. Compile when the program isn't busy if you can. - Change deployment tools that delete and re-create objects to use replace or move instead.
- Keep QRPLOBJ from filling up. An IPL clears it, and IBM support has a document on clearing it without an IPL.
IBM documentation
IBM Display Message Descriptions (DSPMSGD). Use the documentation for your installed release.
This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.
Read the installed message description:
DSPMSGD MSGID(MCH3402) MSGF(QSYS/QCPFMSG)
Also inspect the full job log and second-level message text, including substitution values.
Related codes
Questions
Why did users get MCH3402 right after we deployed a program?
Their jobs still pointed at the old program and it was deleted rather than replaced. Signing off and on fixes it for them, and compiling with REPLACE(*YES) prevents it next time.
What is QRPLOBJ for?
It holds the old version of an object replaced with REPLACE(*YES), so jobs that are still using it keep working. The system clears it at IPL.