I'm trying to use QMHRCVM API to receive messages from a message queue. But the API returns a CPF2451E error very...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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.
Dig Deeper on iSeries ILE programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.