MQRC 2085 — unknown object name
The queue manager could not find the queue or object the program named. Usually a name, case or environment mismatch.
What happened
An MQOPEN or MQPUT1 call returned completion code 2 with reason 2085, MQRC_UNKNOWN_OBJECT_NAME. The program never got a handle to the queue.
MQOPEN failed CompCode=2 Reason=2085 ObjectName: PAY.REQUEST.Q QMgr: QM01
What it means
The queue manager looked for an object with exactly that name and type and found none. MQ names are case-sensitive and can be up to 48 characters, so a small difference counts. The program reached the queue manager — the connection worked — so this is about the object, not the connection.
Typical causes
- A typo, or wrong case (pay.request is not PAY.REQUEST).
- The program connected to a different queue manager than intended, for example the test one.
- The name came from a parameter, file or config and was blank or padded wrongly.
- The queue was never defined in this environment, or was deleted during a change.
- The application expects an alias or remote definition that was not created.
Symptoms
- Fails at once, every time, for that name.
- Often appears straight after a deployment to a new environment.
- Look-alikes: 2035 (exists but not authorized), 2082 (an alias whose base queue does not exist), 2087 (unknown remote queue manager).
Where to look
- The application log, for the exact object name and queue manager used.
- The program's configuration, JCL PARM or input file that supplies the name.
- The queue manager's definitions, using DISPLAY commands.
- Change records for recent deletes or renames.
How to diagnose
- Record the exact name, including case and any trailing characters.
- Confirm which queue manager the program actually connected to.
- On that queue manager, run
DISPLAY QUEUE(name)to see whether any queue type exists with that name; useDISPLAY QLOCAL,DISPLAY QALIASorDISPLAY QREMOTEto narrow it. - If it exists elsewhere but not here, compare environments.
- If the name looks right but is not found, check how the program builds it — field length, padding, case conversion.
How to fix
Correct the name in the configuration or program, or point the program at the right queue manager. If the object is genuinely missing, have it defined through the normal change process with its security profile. Then rerun. Because the open failed, nothing was put, so rerunning the step is normally safe unless the program did other updates first.
How to prevent
- Keep queue definitions in source control and deploy them with the application.
- Hold queue names in configuration, not hard-coded in programs.
- Check that all required objects exist as part of deployment verification.
- Use naming standards and consistent case.
Production considerations
Interview question
After deploying to a new environment, a program gets reason code 2085. How do you approach it?
Stuck on something else?
Ask the community or search the full course.