We had an application working on one system, and we moved it to another system, and we got MQ RC 2010 data length error. It turns out that the
SYSTEM.DEF.SVRCONN had MAXMSGL of 1 – so the maximum message sized allowed on this channel was 1 bytes.
You can specify the maximum msg length on the client for example the MQCD or client table – but I think the negotiation is the lower of the values at each end.
Setting the value to one on the z/OS end was part of stopping people using the default channel definitons.
5 thoughts on “MQRC_DATA_LENGTH_ERROR with client”
I hope you used a different channel rather than enabling the SYSTEM.DEF.SVRCONN?
When it worked I was using a different channel. The channel had been enabled, but was blocked using Blockip, and had this length of one.
Altering SYSTEM.DEF.SVRCONN to have MAXMSGL of 1 is a common security practice to prevent usage of this default channel, MCAUSER is also commonly set to ‘nobody’. When defining a new SVRCONN type channel, MAXMSGL and MCAUSER need to be explicitly set, to override the default. This also makes you think about the max msg length that will be required and the security implications for setting MCAUSER. This is covered in the MQ Security Scenarios redbook.
Thank you for your comments. You are right in all you say. As part of my MQ health checks, I would ask if the options were specified as you said. I was surprised with myself for falling over this. This feels like a two brain problem. One brain used for health checks, the other brain as a struggling end user.
LikeLiked by 1 person