|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
problem sending msgs containing numbers to HOST |
« View previous topic :: View next topic » |
Author |
Message
|
carlogol |
Posted: Mon Feb 17, 2003 9:16 am Post subject: problem sending msgs containing numbers to HOST |
|
|
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 |
|
 |
RogerLacroix |
Posted: Mon Feb 17, 2003 10:11 pm Post subject: |
|
|
 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 |
|
 |
carlogol |
Posted: Tue Feb 18, 2003 1:11 am Post subject: I wish it would be so easy... |
|
|
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 |
|
 |
bower5932 |
Posted: Tue Feb 18, 2003 4:47 am Post subject: |
|
|
 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 |
|
 |
carlogol |
Posted: Tue Feb 18, 2003 5:10 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2003 Posts: 6
|
Chapter 11? Ok...
Thanks again |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|