IBM i message

CPF2110: Library not found

CPF2110 means the library named on a command doesn't exist on the system, or isn't visible to the job. It comes from library and object commands such as ADDLIBLE, CHGLIBL, CRTDUPOBJ and RNMOBJ.

Other names for this code

Also written as CPF2110 library not found, MSGID CPF2110, ADDLIBLE CPF2110, MONMSG CPF2110, CRTDUPOBJ CPF2110.

What it means

CPF2110 is an escape message from QCPFMSG with the text "Library &1 not found". It has the same meaning as CPF9810. IBM i has two families of messages for the same problem, and which one you see depends on the command. The CPF21xx messages come from commands that work on libraries and objects as such, for example ADDLIBLE, CHGLIBL, CRTDUPOBJ and RNMOBJ.

A library on IBM i is an object of type *LIB, and every library is kept in QSYS. When the command named a library and the system found no *LIB object of that name, the command stopped. On CRTDUPOBJ the missing library can be either the from-library or the to-library, so check both.

A library can also exist and still be invisible. Libraries in an independent ASP can only be seen by a job that has set its ASP group to that ASP.

Common causes

  • The library name is misspelled, or built wrongly from a variable.
  • The library hasn't been created or restored on this system, which is common on a new system, after a recovery, or when a test program runs in production.
  • The library was renamed or deleted, and a program, job description or scheduled job still uses the old name.
  • CRTDUPOBJ names a to-library that doesn't exist yet. It doesn't create the library for you.
  • The library is in an independent ASP that is varied off, or the job hasn't run SETASPGRP.

How to find the problem

  1. Open the job log with DSPJOBLOG, put the cursor on CPF2110 and press F1. The help names the library. The command logged just before it shows exactly how the program spelled the name.
  2. Check whether the library exists with DSPOBJD OBJ(QSYS/ACCTLIB) OBJTYPE(*LIB), or list similar names with WRKLIB LIB(ACCT*).
  3. For CRTDUPOBJ or RNMOBJ, check every library parameter on the command, not just the first one.
  4. For an independent ASP, check that the ASP device is available and that the job set its ASP group.

How to fix it

  • Correct the library name in the command, the program or the job description.
  • Create the library with CRTLIB, or restore it with RSTLIB, if it should exist.
  • Vary on the independent ASP and run SETASPGRP before the command.
  • In CL, when the library is optional, monitor for the message, for example ADDLIBLE LIB(ACCTLIB) followed by MONMSG MSGID(CPF2110 CPF2103). Only do this when the program really can run without the library.

What it looks like

Library ACCTLIB 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(CPF2110) MSGF(QSYS/QCPFMSG)

Also inspect the full job log and second-level message text, including substitution values.

Report a correction to WND Software.

Questions

What is the difference between CPF2110 and CPF9810?

They mean the same thing. CPF2110 is sent by library and object commands such as ADDLIBLE, CHGLIBL and CRTDUPOBJ, and CPF9810 by commands such as CHKOBJ.

Can I add a library to my library list before I create it?

No. ADDLIBLE needs the library to exist, so it sends CPF2110. Create the library first, then add it.

The library shows up in WRKLIB but my job still gets CPF2110. Why?

Check the exact spelling the program used in the job log. If it matches, the library is probably in an independent ASP that your WRKLIB session can see and the failing job can't.