Author |
Message
|
timmq |
Posted: Wed Sep 12, 2007 10:42 am Post subject: Sending Test Message From COBOL |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Sep 12, 2007 11:12 am Post subject: |
|
|
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 |
|
 |
RogerLacroix |
Posted: Wed Sep 12, 2007 11:35 am Post subject: Re: Sending Test Message From COBOL |
|
|
 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 |
|
 |
timmq |
Posted: Wed Sep 12, 2007 1:30 pm Post subject: |
|
|
Novice
Joined: 12 Sep 2007 Posts: 12
|
Thanx guys..It worked fine.. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Sep 12, 2007 11:00 pm Post subject: Re: Sending Test Message From COBOL |
|
|
 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 |
|
 |
timmq |
Posted: Mon Oct 01, 2007 7:42 am Post subject: Converting from Ascii to MF format |
|
|
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 |
|
 |
fjb_saper |
Posted: Mon Oct 01, 2007 1:39 pm Post subject: Re: Converting from Ascii to MF format |
|
|
 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 |
|
 |
Blomman |
Posted: Tue Oct 02, 2007 10:08 am Post subject: Re: Converting from Ascii to MF format |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Oct 02, 2007 1:54 pm Post subject: |
|
|
 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 |
|
 |
|