Author |
Message
|
tonecity |
Posted: Wed Jan 26, 2005 6:55 pm Post subject: MQRC_FORMAT_ERROR from mainframe OS/390 to WIN2K |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 4
|
Hi,
Environment Background:
- MQPUT application in WIN2K sending request message to OS/390 using CICS Bridge (ie. have to set up MQCIH header) using .Net. PUT application has MQMD Format field set to MQFMT_CICS, the Encoding field set to 785 and CCSID set to 500 (for host). MQCIH Format field is set to MQFMT_STRING and ReplyToFormat set to MQFMT_STRING. The message is sent successfully and picked up by CICS Bridge which triggers a CICS transaction to perform some processing. The CICS transaction completes successfully and sends back a reply message back to the server on WIN2K. When the data is received, data format is still in EBCDIC.
- MQGET application has MQMD Format field set to MQFMT_STRING, Encoding field set to MQENC_NATIVE and CCSID set to MQCCSI_Q_MGR.
I am using MQGMO_CONVERT option in my MQGET. However, i am getting error 2110 MQRC_FORMAT_ERROR. I have checked and followed the documentation but have not managed to read my reply in ASCII.
Would greatly appreciate if anyone can help me out with this last hurdle in my application.
Thanks in advance and regards,
Tony |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jan 26, 2005 7:17 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
MQRC_FORMAT_ERROR
An MQGET call was issued with the MQGMO_CONVERT option specified in the GetMsgOpts parameter, but the message cannot be converted successfully due to an error associated with the message format. Possible errors include:
The format name in the message is MQFMT_NONE.
A user-written exit with the name specified by the Format field in the message cannot be found.
The message contains data that is not consistent with the format definition.
The message is returned unconverted to the application issuing the MQGET call, the values of the CodedCharSetId and Encoding fields in the MsgDesc parameter are set to those of the message returned, and the call completes with MQCC_WARNING.
If the message consists of several parts, each of which is described by its own CodedCharSetId and Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some parts may be converted and other parts not converted. However, the values returned in the various CodedCharSetId and Encoding fields always correctly describe the relevant message data.
Corrective action: Check the format name that was specified when the message was put. If this is not one of the built-in formats, check that a suitable exit with the same name as the format is available for the queue manager to load. Verify that the data in the message corresponds to the format expected by the exit.
|
So if you do indeed see that CICS is sending back the message with the MQMD_FORMAT set to 'MQSTR ', then I would bet the CICS app is sending you back packed decimals (COMP-3), which is not string data.
Also, when you send the message from your .NET app, you should not set the CCSID to 500. 500 is EBCIDIC. And you are saying your .NET-produced message is EBCIDIC by putting 500 in the CCSID on the MQPUT, which it is not. It is ASCII. Leave the MQMD_CCSID alone on the MQPUT, and let MQ decide what it is. If you feel compelled to set it, pick the CCSID of the platform where your .NET app is running (probably 437 for Windows). (But now your app is not portable off of Windows) _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
tonecity |
Posted: Wed Jan 26, 2005 8:17 pm Post subject: |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 4
|
Hi Peter,
Thanks for your prompt response.
My PUT MQMD Format field is set to MQ_CICS (and not MQ_STRING). This is because CICS Bridge requires it to be set to this format otherwise it won't pick it up. I also need to specifically set the encoding to 785 and CCSID to 500 otherwise CICS Bridge won't recognize it.
I have tried your suggestions of using various MQ_STRING and not setting the CCSID etc, but my response just gets truncated and only the headers came back (also in garbage data).
Any other suggestions?
Thanks. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jan 26, 2005 10:21 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
From memory (and it was 5 years ago, so this might have changed), only the libraries on the mainframe have the conversion routines to convert the CICS header, so you have to use conversion on the Channel.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jan 27, 2005 12:03 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
EddieA is right, the CICS header, format MQFMT_CICS, is an inbuilt format on mainframe only, and cannot be converted on distributed platforms. See the usage notes for MQGET in the App Prog Ref, which lists the formats that are converted by the qmgr; MQFMT_CICS has z/OS only after it. |
|
Back to top |
|
 |
tonecity |
Posted: Thu Jan 27, 2005 2:04 am Post subject: |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 4
|
Thanks for your responses guys.
I tried using Conversion set to Yes on the host sender channel (when the reply is sent back from the host to WIN2K), but it didn't make any difference to my response data. Could i be doing something wrong or do i need to set any other settings?
Otherwise, i think i'm still stuck with this problem. Does anyone know how i can write a conversion exit program, or does anyone have any samples i can use?
I'm sure other people have came across this problem previously and there must be some solution to this conversion problem right (besides writing a conversion exit which i don't know how to).
Thanks,
Tony |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jan 27, 2005 7:23 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Sorry, so I had no idea what I was talking about when it came to sending a message to the CICS bridge!
Tony, after you turned CONEVERT to yes on the SNDR channel from the MF to your WIN2K QM, was the channel restarted to pick up the change?
Assuming yes, when you look at the message on the Reply queue using amqsbcg, does it show up as ASCII, or is still EBCIDIC? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jan 27, 2005 8:31 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Did you add the DD to the Chin for the conversion routines.
Don't ask me what that DD is, because it was 5 years ago, and undocumumented at the time.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
tonecity |
Posted: Thu Jan 27, 2005 11:10 pm Post subject: |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 4
|
Hi all,
Thanks guys for all your help! I finally got it working. I had to set the Conversion on the host Sender Channel to 'Yes' (as you guys have suggested). It didn't work the first time because we didn't restart the channel, so thanks for pointing this out. Now its working.
Wouldn't have got it working without all your prompt responses, so really appreciate it.
Tony |
|
Back to top |
|
 |
|