IBM i message

MCH3401: Cannot resolve to object

MCH3401 (Cannot resolve to object) means a program on IBM i asked the machine to locate an object by name, usually another program to call, and the machine couldn't find one it was allowed to use.

Other names for this code

Also written as MCH3401 error, MCH3401 cannot resolve to object, cannot resolve to object, MCH3401 type and subtype X'0201', MCH3401 RPG call, MSGID MCH3401.

What it means

Before a program can call another program or use an object by name, the machine has to resolve that name to the object itself. It searches the library given, or the job's library list, for an object with that name and type, and it checks authority. When it finds nothing usable, it sends MCH3401.

The message names the object and gives its type and subtype in hex, plus the authority that was needed. Type and subtype X'0201' is a program, which is by far the most common case. The authority value shows what access to the object was requested, and X'0000' means none in particular.

MCH3401 is sent to the program that asked for the object. An ILE RPG program reports a failed call as status 00211, error calling a program or procedure, and shows inquiry RNQ0211 if nothing handles it. A CL program gets an inquiry or a function check.

Common causes

  • The called program isn't in any library on the job's library list. This often happens when a job runs with a different job description, user profile or initial library list than the one the program was tested with.
  • The program name is misspelled, or a variable holding the name has the wrong value or trailing data.
  • The library named in a qualified call doesn't exist on this system, for example a test library name left in production code.
  • The user isn't authorized to the object or to its library. IBM documents this as one cause, and suggests testing under a profile with full authority to tell the two apart.
  • A library the system needs isn't in the system part of the library list. IBM documents a case where QSYS2 was missing from system value QSYSLIBL and the APING command posted MCH3401 for several objects.

How to find the problem

  1. Run DSPJOBLOG, put the cursor on MCH3401 and press F1. Note the object name, the type and subtype, and the program that asked for it (F9 for details).
  2. Check whether the object exists with WRKOBJ OBJ(*ALL/PAYCALC) OBJTYPE(*PGM), using the type the message gave.
  3. Compare the libraries it lives in with the job's library list. Use DSPLIBL in an interactive job, or option 13 of WRKJOB for a batch job.
  4. If the object exists and its library is in the list, check authority with DSPOBJAUT on the object and on its library.

How to fix it

  • Add the library to the library list, with ADDLIBLE or by fixing the job description's initial library list (CHGJOBD ... INLLIBL(...)).
  • Qualify the call with the correct library if the program should always come from one place.
  • Correct the program name or the variable that holds it.
  • Grant the user the authority it needs to the object and its library, usually through a group profile or an authorization list.
  • If a system library is missing, fix system value QSYSLIBL with WRKSYSVAL. Users must sign off and back on before the change takes effect for them.

What it looks like

Cannot resolve to object PAYCALC. Type and Subtype X'0201' Authority X'0000'.

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(MCH3401) 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 does Type and Subtype X'0201' mean in MCH3401?

It means the object the machine looked for is a program. That is the most common form of MCH3401, raised when a call can't find the program it names.

Why does the program work interactively but fail with MCH3401 in batch?

Batch jobs build their library list from the job description, which often differs from your interactive session. Compare the two library lists.

Can MCH3401 be an authority problem?

Yes. IBM lists missing authority to the object as one cause. If the object exists in a library on the list, check object and library authority next.