CPF2105: Object not found
CPF2105 means the command looked for an object of a given name and type in a library and didn't find it. The message gives the object name, the library and the object type.
Other names for this code
Also written as CPF2105 object not found, MSGID CPF2105, MONMSG CPF2105, DLTF CPF2105, object in library type not found.
What it means
CPF2105 is an escape message from QCPFMSG with the text "Object &1 in &2 type *&3 not found". It belongs to the CPF21xx family that IBM i's library and object commands use, such as RNMOBJ and CRTDUPOBJ, and delete commands send it too. It means the same as CPF9801, with the object type added to the text.
The type matters. IBM i allows a file called PAYMAST and a program called PAYMAST in the same library, because they are different types. So CPF2105 can appear even when DSPLIB shows something with that name, if it is the wrong type.
Many CL programs expect this message. The common pattern deletes a work file before building it again and monitors for CPF2105, so the program carries on when the file isn't there. When monitored like that, CPF2105 in a job log is normal. It only matters if the program stops with a function check (CPF9999) after it.
Common causes
- A CL program deletes a work object that doesn't exist yet, for example on the first run or in a new job where QTEMP is empty, and doesn't monitor for the message.
- The object name or library is misspelled, or a variable built the wrong name.
- The command names the wrong object type, for example *PGM when the object is a *SRVPGM or a *CMD.
- The object was already deleted, moved or renamed by an earlier step or another job.
- With *LIBL, the library that holds the object isn't on the job's library list.
How to find the problem
- Open the job log with DSPJOBLOG, put the cursor on CPF2105 and press F1. The help shows the object, library and type. The command logged just before it shows the exact names the program used.
- Run
WRKOBJ OBJ(*ALL/PAYWORK)to see every library holding an object of that name, and its type. - If the command used *LIBL, run DSPLIBL in the same kind of job to see which libraries were searched.
- If a function check followed, F9 on the CPF9999 message shows the program and statement.
How to fix it
- For a delete that may find nothing, monitor for the message:
DLTF FILE(QTEMP/followed byPAYWORK) MONMSG MSGID(CPF2105). - Correct the name, library or object type on the command.
- If the object should exist, find out which step deletes or fails to create it, and fix the order of the steps.
- Qualify the library instead of relying on *LIBL when the object always lives in one place.
What it looks like
Object PAYWORK in QTEMP type *FILE not found.
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(CPF2105) MSGF(QSYS/QCPFMSG)
Also inspect the full job log and second-level message text, including substitution values.
Related codes
Questions
What is the difference between CPF2105 and CPF9801?
Both mean the object wasn't found. CPF2105 comes from library and object commands and includes the object type in its text. CPF9801 comes from commands such as CHKOBJ.
Why do so many CL programs monitor for CPF2105?
Because they delete work files before creating them again. On the first run the file isn't there, and monitoring for CPF2105 lets the program carry on.
DSPLIB shows an object with that name. Why do I get CPF2105?
The object you see is probably a different type. Check the type in the message against the type shown by WRKOBJ.