IBM i message

RNQ0202: Called program or procedure failed

RNQ0202 means a program or procedure that an ILE RPG program called ended in error. It matches RPG program status code 00202. The real problem is in the called program, and its own error message is earlier in the job log.

Other names for this code

Also written as RNX0202, status 00202, RPG status 202, %STATUS 202, call to program ended in error, RPG called program failed.

What it means

RNQ0202 is an ILE RPG runtime message for program status 00202. IBM's ILE RPG Reference describes that status as a called program or procedure that failed while no halt indicator (H1 to H9) was on. The calling program used CALL, CALLB or CALLP, and the program or procedure it called ended abnormally instead of returning.

RNQ0202 is the second message in a chain. Something went wrong inside the called program first, such as a decimal data error, a record lock or a CL command that failed. That program didn't recover, so it ended in error. Only then did the caller see status 00202. If the called program is also RPG, it may already have sent its own RNQ inquiry. Someone answered C, it ended, and now the caller is asking too. So two inquiries in a row is normal.

RNQ0202 is the inquiry form, sent because the calling program didn't handle the failure. RNX0202 is the escape form of the same condition. It doesn't wait for a reply and is what a MONITOR group, an error indicator or a calling program sees. A called program that ends with a halt indicator on gives status 00231 instead.

Common causes

  • An unhandled error in the called program, such as a decimal data error, divide by zero or array index error.
  • A CL program that was called and ended because a command sent an escape message it didn't monitor.
  • An earlier RNQ inquiry in the called program that was answered with C or D.
  • A called program that deliberately sent an escape message to report a failure, often CPF9898 with its own text.
  • A file error in the called program that it didn't handle, such as a missing member or a record held by another job.

How to find the problem

  1. Read the job log with DSPJOBLOG and look above RNQ0202. The first error message from the called program is the real cause.
  2. Press F1 on RNQ0202. The help text names the called program or procedure and the statement in the caller that made the call.
  3. Look for a CPF9999 function check from the called program. Its text names the message that went unmonitored and the statement where it happened.
  4. In batch, check QSYSOPR (DSPMSG QSYSOPR) for an earlier inquiry from the called program and the reply it got.

How to fix it

  • Fix the error in the called program. RNQ0202 goes away once the program it calls stops failing.
  • In the caller, handle the failure on purpose. Use CALLP(E) and test %ERROR, or put the call in a MONITOR group with ON-ERROR 00202, then log the problem and end cleanly.
  • Make the called program report problems with a clear escape message, so the caller and the job log say what went wrong.
  • Reply C for the waiting job. Use D if the developers want a dump of the calling program.

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.

Report a correction to WND Software.

Questions

Why do I get two RNQ messages, one after the other?

The called program hit an error and asked first. After it was cancelled, the calling program saw status 00202 and asked about the failed call. Fix the first error and both go away.

What is the difference between RNQ0202 and RNQ0211?

RNQ0211 means the call itself failed, so the called program never started, for example because it wasn't found. RNQ0202 means the called program ran and then ended in error.

Which reply should I give to an RNQ message?

C (cancel) is the safe answer when you don't know the program. D and F also cancel, but first write a dump the developers can use. G skips the rest of the current RPG cycle and resumes at its input step (*GETIN). That is a call for the program's owner to make.