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 » IBM MQ Java / JMS » problem sending msgs containing numbers to HOST

Post new topic  Reply to topic
 problem sending msgs containing numbers to HOST « View previous topic :: View next topic » 
Author Message
carlogol
PostPosted: Mon Feb 17, 2003 9:16 am    Post subject: problem sending msgs containing numbers to HOST Reply with quote

Newbie

Joined: 17 Feb 2003
Posts: 6

Hi everybody

I am rather new to MQ, so I apologize if my question may seem ... stupid

Anyway, I have to write some java classes to send messages to a HOST system from a WinNT system via MQ.

The problem is: I can send string msgs correctly (channel conversion is ON, msg format is MQFMT_STRING) and ASCI<->EBCIDC conversion is handled gracefully. But... if these messages contains numbers, something goes wrong (ehm... maybe I do something wrong) and the HOST system does not read the same number I sent.

For instance, I try to send data which "reflects" the following cobol copybook:

ID-STRUT PIC X(04)
SENDER_APP PIC X(20)
LENGTH PIC S9(09)
...

The problem is... if I set the length field to 35678 with a call to writeInt4(), the cobol program reads another value.

Please... help me!!!

Thanks in advance
Carlo
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Feb 17, 2003 10:11 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,

To do what you ask requires either a transformation tool or a message exit. WMQ does not understand where one field (i.e. string) ends and the another field begins (i.e. binary data).

The simplest way to handle this is to convert everything to text. Then let WMQ do the convert for you. Tell your COBOL programmer to change the PIC X variables to display field variables.

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
carlogol
PostPosted: Tue Feb 18, 2003 1:11 am    Post subject: I wish it would be so easy... Reply with quote

Newbie

Joined: 17 Feb 2003
Posts: 6

Thanks for your answer.

The problem is, the COBOL program cannot be changed at all!!! We have to deal with cobpybook of that kind (strings AND binary).

So... what can I do?
Perhaps... do not have MQ Server translate msg data, but convert with a program EXIT? Can you point me to some samples/tutorial/docs to see how this can be done?

Thanks a lot
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 18, 2003 4:47 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Check out Chapter 11 of the Application Programming Guide. It is on writing data-conversion exits.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
carlogol
PostPosted: Tue Feb 18, 2003 5:10 am    Post subject: Reply with quote

Newbie

Joined: 17 Feb 2003
Posts: 6

Chapter 11? Ok...

Thanks again
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » problem sending msgs containing numbers to HOST
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.