Problem solve Get help with specific problems with your technologies, process and projects.

QMHRCVM API to receive messages from a message queue

I'm trying to use QMHRCVM API to receive messages from a message queue. But the API returns a CPF2451E error very often. The error means "Message queue is allocated to another job". I can't figure out when the error happens. Could you tell me when the error occurs and any way to avoid the error or alternative way to receive messages from a message queue?

This error occurs when another job (such as the user profile it may be allocated) has the message queue allocate with either *NOTIFY or *BREAK. You can handle the error message in your code. The only other API that will allow you to handle messages is the QMHLSTM API, which will allow you to list messages for any non-program message queue into user space.

This was last published in July 2001

Dig Deeper on iSeries ILE programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.