IMS status code

IMS status QC: No more input messages

IMS status code QC means a GU call to the I/O PCB found no more input messages for the program. In an MPP or message-driven BMP it's the normal signal that the program should finish and give control back to IMS.

Other names for this code

Also written as status code QC, IMS QC, DL/I status QC, QC status code, no more messages IMS.

What it means

A message processing program runs in a loop. It issues a GU to the I/O PCB to get the first segment of an input message, processes it, inserts the reply, and issues the next GU. When no messages are waiting for the transaction codes the program serves, the GU returns QC. The program should then end normally. QC appears in the I/O PCB, not in a database PCB.

The CHKP call can also return QC. In a message-driven BMP, a checkpoint call gets the first segment of the next input message as well as taking the checkpoint. So when the queue is empty, the CHKP comes back with QC.

QC is not an error. A program that treats it as one usually ends with a return code or abend it didn't need.

Common causes

  • The message queue for the transaction is empty. This is the normal way a message program ends.
  • A BMP was started with an input transaction code (the IN= value in its parameters) when it was meant to be a plain batch-oriented BMP. That makes it message-driven, so its CHKP calls try to read messages and come back with QC. Moving JCL from a DL/I batch job to a BMP without changing the parameters can cause this.
  • Messages are being queued under a different transaction code from the one the program or BMP reads.
  • The transaction is stopped, or messages were routed elsewhere, so nothing reaches this program's queue.

How to find the problem

  1. Check the status code in the I/O PCB right after the GU or CHKP. QC on the I/O PCB is the queue-empty signal.
  2. Use /DISPLAY TRANSACTION trancode to see how many messages are queued and whether the transaction is stopped.
  3. For a BMP, look at the parameters on the EXEC statement and find the input transaction code. If there is one, the BMP is message-driven.
  4. If the program loops after QC, look for a GU that runs again without testing the status.

How to fix it

  • End the program normally on QC. Close any files and return to IMS.
  • Don't treat QC as an error in the status check after a message GU or a CHKP in a message-driven program.
  • If a BMP shouldn't read messages, remove the input transaction code from its parameters. Then CHKP no longer tries to get a message.
  • If the program should have found messages, check the transaction code, use /DISPLAY TRANSACTION and start the transaction if it is stopped.

IBM documentation

IBM documentation: status QC. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Is QC an error?

No. It's the normal way IMS tells a message program there is nothing more for it to process.

Why does my CHKP call return QC?

In a message-driven BMP, CHKP also retrieves the next input message. If none is waiting, it returns QC. If the BMP isn't meant to process messages, it was probably started with an input transaction code it doesn't need.

What is the difference between QC and QD?

QC comes back on a GU when there are no more messages. QD comes back on a GN to the I/O PCB when the current message has no more segments.