Question & Answer
Question
Why does my job get a MCH3402 when trying to use a recently compiled program?
Answer
When a program is compiled using any compile command (CRTCLPGM, CRTBNDRPG, ETC.), it is best to compile the programs when they are not in use by other jobs. However, sometimes you need to compile a program without ending all of the jobs that may be using the programs. Any jobs that have already used the program hold a pointer to the program for future calls to the same program. If a program is compiled, jobs that already had a pointer to the program will continue to use the old program until the job completes. This is because by default compiles use REPLACE(*YES), which causes the old program to be moved to the QRPLOBJ library, so the pointer held by these jobs is still valid.
Sometimes people compile a program, and then find that jobs trying to use that program get the following error:
- Message ID . . . . . . . . . : MCH3402
Message file . . . . . . . . : QCPFMSG
Library . . . . . . . . . : QSYS
Message . . . . : Tried to refer to all or part of an object that no longer
exists.
Cause . . . . . : The most common cause is that a stored address to an
object is no longer correct because that object was deleted or part of the
object was deleted.
Frequently this is because the old program was deleted prior to compiling instead of using REPLACE(*YES). When the program is deleted, the pointer becomes invalid, and so when the job tries to use the pointer again, it gets the MCH3402.
Ocasionally this happens even when REPLACE(*YES) is used. At V7R2 and older, QRPLOBJ library can hold about 360,000 objects. Starting at V7R3, QRPLOBJ can hold about 1 million objects. When the QRPLOBJ library is full, any objects destined for QRPLOBJ go to QTEMP instead. Other jobs can still have a pointer to it, but if the job that did the compile ends, the QTEMP library for that job is deleted, and the pointer to the old program is no longer valid, so any job trying to use the old program will get the MCH3402.
QRPLOBJ gets cleared each IPL. If you are unable to IPL, but need to free up space in QRPLOBJ, here is a document with some tips:
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1021788