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 Index » Mainframe, CICS, TXSeries » Sending Test Message From COBOL

Post new topic  Reply to topic
 Sending Test Message From COBOL « View previous topic :: View next topic » 
Author Message
timmq
PostPosted: Wed Sep 12, 2007 10:42 am    Post subject: Sending Test Message From COBOL Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

Hi,

We are in the process of intergrating mainframe applications with a EAI tool. Websphere MQ is used as MOM tool. When the data is written to MQ from Cobol using MQPUT, the format of the message is in the Byte format. But the EAI tool throws an Error saying 'Unsuported format', since it supports only text messages. Is there any way I can set the message format as TEXT, when writing the message to queue using MQPUT?

Tim
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 12, 2007 11:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes. Set the format field of the MQMD to MQFMT_STRING
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Sep 12, 2007 11:35 am    Post subject: Re: Sending Test Message From COBOL Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

timmq wrote:
When the data is written to MQ from Cobol using MQPUT, the format of the message is in the Byte format. But the EAI tool throws an Error saying 'Unsuported format', since it supports only text messages.

Is the data actually 'text' (string) format (i.e. not 'PIC 9')? If so, then do as Jeff suggested.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
timmq
PostPosted: Wed Sep 12, 2007 1:30 pm    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

Thanx guys..It worked fine..
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Sep 12, 2007 11:00 pm    Post subject: Re: Sending Test Message From COBOL Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

RogerLacroix wrote:
Is the data actually 'text' (string) format (i.e. not 'PIC 9')?

Actually, PIC 9 is equivalent to "text".

Now, any other variation, using a sign field, or anything using COMP, COMP-3, etc. isn't.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
timmq
PostPosted: Mon Oct 01, 2007 7:42 am    Post subject: Converting from Ascii to MF format Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

Hi,

Thanx for resolving the first problem I faced. But I am facing the conversion problem in processing the response. The client(JAVA) that is sending the XML response is in ASCII format. But the mainframe is not able to read and process it. Do I need to specify any options like 'MQFMT_STRING' while reading the data to convert into a format that mainframe can understand?


Thanx in advance
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 01, 2007 1:39 pm    Post subject: Re: Converting from Ascii to MF format Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

timmq wrote:
Hi,

Thanx for resolving the first problem I faced. But I am facing the conversion problem in processing the response. The client(JAVA) that is sending the XML response is in ASCII format. But the mainframe is not able to read and process it. Do I need to specify any options like 'MQFMT_STRING' while reading the data to convert into a format that mainframe can understand?


Thanx in advance


Make sure the sender (java) sent a message with following characteristics:
MQMD.Format = MQFMT_STRING

and if JMS the message needs to be a javax.jms.TextMessage and the queue needs to be defined with a targetClient=1 (MQ).

When you do the get, add the option Get with convert.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Blomman
PostPosted: Tue Oct 02, 2007 10:08 am    Post subject: Re: Converting from Ascii to MF format Reply with quote

Master

Joined: 31 Oct 2006
Posts: 230

fjb_saper wrote:
timmq wrote:
Hi,

Thanx for resolving the first problem I faced. But I am facing the conversion problem in processing the response. The client(JAVA) that is sending the XML response is in ASCII format. But the mainframe is not able to read and process it. Do I need to specify any options like 'MQFMT_STRING' while reading the data to convert into a format that mainframe can understand?


Thanx in advance


Make sure the sender (java) sent a message with following characteristics:
MQMD.Format = MQFMT_STRING

and if JMS the message needs to be a javax.jms.TextMessage and the queue needs to be defined with a targetClient=1 (MQ).

When you do the get, add the option Get with convert.

Enjoy


So i only has to set MQMD.Format = MQFMT_STRING if i am not using JMS??

//Blomman
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 02, 2007 1:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

No in both cases you want to change the MF to do the GET with Convert...

You might have to handle the warning if no convert is necessary...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Sending Test Message From COBOL
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.