ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ API SupportCan you force MQSTR on MQGET

Post new topicReply to topic
Can you force MQSTR on MQGET View previous topic :: View next topic
Author Message
fswarbrick
PostPosted: Wed Aug 21, 2019 2:38 pm Post subject: Can you force MQSTR on MQGET Reply with quote

Newbie

Joined: 07 Jul 2014
Posts: 9

I have a vendor application that appears to write messages with the format of MQFMT_NONE (spaces) instead of MQFMT_STRING (MQSTR). The vendor application runs on Windows (Java) using CCSID 1208 (UTF-8) by default. We are a mainframe shop using EBCDIC (CCSID 1140).

As it stands now the vendor has an option to convert to EBCDIC prior to putting the message on the queue. This works fine, but seems to me to not take full advantage of MQ features. They should, I imagine, be using MQSTR format and simply writing using UTF-8 (which they do by default). We could then set the MQGMO_CONVERT option and specify CCSID 1140.

So my question is, is there a way I could have MQ do the conversion even though the vendor application is using MQFTM_NONE?

Thank you,
Frank
Back to top
View user's profile Send private message
hughson
PostPosted: Wed Aug 21, 2019 6:55 pm Post subject: Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1274
Location: Bay of Plenty, New Zealand

I imagine there is probably some really convoluted combination of API exits and data conversion exits that might get you there, but it would be much easier to talk the putting application vendor into setting one small character field - the MQMD.Format - to the appropriate value.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
markt
PostPosted: Wed Aug 21, 2019 10:23 pm Post subject: Reply with quote

Chevalier

Joined: 14 May 2002
Posts: 427

If it's a Java program, the ease of changing the app will be different between using the base Java classes or JMS where it would have to be a TextMessage object. Not a big change in itself but might have ripples depending on how the app's classes are structured.

Since this is a mainframe GETter, then even exits might be effectivtly impossible if the PUTter is client-connected. If it's coming across a channel from a Windows qmgr, then a Message exit might do the trick.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Aug 22, 2019 1:14 am Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 723
Location: Germany

You could also use a channel exit which changes the format value.

But the "correct" solution would be - as Morag suggested - to change the application.

Maybe you could open a ticket, change request or whatever against the vendor, that the put the correct Information into the MQMD
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
fswarbrick
PostPosted: Thu Aug 22, 2019 7:55 am Post subject: Reply with quote

Newbie

Joined: 07 Jul 2014
Posts: 9

I have requested the vendor change from using a BytesMessage to a TextMessage. Who knows if they will do it, or how long it will take. Thus the question.
Looks like I'll live with it until such time as the vendor makes the change.
Thanks to all!
Back to top
View user's profile Send private message
tczielke
PostPosted: Thu Aug 22, 2019 11:18 am Post subject: Reply with quote

Sentinel

Joined: 08 Jul 2010
Posts: 846
Location: Illinois, USA

What language is the getting application using on the mainframe?
_________________
Working with MQ since 2010.

Miami Dolphins 2019 - Tank you for the memories.
Back to top
View user's profile Send private message
fswarbrick
PostPosted: Thu Aug 22, 2019 11:21 am Post subject: Reply with quote

Newbie

Joined: 07 Jul 2014
Posts: 9

tczielke wrote:
What language is the getting application using on the mainframe?

COBOL.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Aug 22, 2019 2:46 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8514
Location: US: west coast, almost. Otherwise, enroute.

fswarbrick wrote:
I have requested the vendor change from using a BytesMessage to a TextMessage. Who knows if they will do it, or how long it will take. Thus the question.
Looks like I'll live with it until such time as the vendor makes the change.
Thanks to all!

It's possible/likely that the application message data component is mixed - some text, some binaries, some of this, some of that. If so, neither BytesMessage nor TextMessage will improve your lot.

What can you tell us about the application message data component? What is it... exactly?
_________________
There are two types of people in this world:
1) Those that can extrapolate from incomplete data
Back to top
View user's profile Send private message
fswarbrick
PostPosted: Thu Aug 22, 2019 2:51 pm Post subject: Reply with quote

Newbie

Joined: 07 Jul 2014
Posts: 9

The message is pure text. It won't be an problem for them to change. I think whoever developed the application just had a misunderstanding of some sort.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 22, 2019 3:53 pm Post subject: Re: Can you force MQSTR on MQGET Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2032
Location: Melbourne, Australia

fswarbrick wrote:
I have a vendor application that appears to write messages with the format of MQFMT_NONE (spaces) instead of MQFMT_STRING (MQSTR). The vendor application runs on Windows (Java) using CCSID 1208 (UTF- by default. We are a mainframe shop using EBCDIC (CCSID 1140).

As it stands now the vendor has an option to convert to EBCDIC prior to putting the message on the queue. This works fine, but seems to me to not take full advantage of MQ features. They should, I imagine, be using MQSTR format and simply writing using UTF-8 (which they do by default). We could then set the MQGMO_CONVERT option and specify CCSID 1140.

The vendor has coded their MQ application incorrectly, so they will need to correct the defect. You must go down this path. Anything else is a compromise that will involve signficant time and effort to implement, and creates a technical debt for future generations.

Quote:
So my question is, is there a way I could have MQ do the conversion even though the vendor application is using MQFTM_NONE?

A solution is to add an intermediate app program that gets the MQFMT_NONE messages and puts them to another queue as MQFMT_STRING with a valid CCSID. The z/OS COBOL app then does MQGET with MQGMO_CONVERT from the other queue.

Thank you,
Frank[/quote]
_________________
Glenn
Back to top
View user's profile Send private message
fswarbrick
PostPosted: Thu Aug 22, 2019 3:57 pm Post subject: Re: Can you force MQSTR on MQGET Reply with quote

Newbie

Joined: 07 Jul 2014
Posts: 9

gbaddeley wrote:
A solution is to add an intermediate app program that gets the MQFMT_NONE messages and puts them to another queue as MQFMT_STRING with a valid CCSID. The z/OS COBOL app then does MQGET with MQGMO_CONVERT from the other queue.

Yeah, I thought of that. (Not a different programs, just having the program do MQGET/MQPUT as MQSTR/MQGET.) Probably not worth the effort. Hopefully I can convince the vendor to fix their interface.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportCan you force MQSTR on MQGET
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.