|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Data Conversion |
« View previous topic :: View next topic » |
Author |
Message
|
vinod_sri |
Posted: Mon Jun 11, 2007 7:46 am Post subject: Data Conversion |
|
|
Apprentice
Joined: 10 Dec 2003 Posts: 42 Location: Atlanta
|
Hello Friends,
I have a problem converting a part of TDS message. The last filed of the message is for comments. These comments are coming in as some weird format. I have no clue what format is that. I am trying to convert these comments to the regular English format. I have tried different combinations of CCSID and Encoding values with convert option. The message gets processed without any errors. But the database column is getting populated with the same junk characters without any conversion. Please find the sample message and its properties details below. I hope some of you might have come across similar kind of issue. I am requesting you to give me an idea to resolve this issue.
The sample message looks like:
ABCDEF1.153161804911017402221DSM014PNQ2007-06-04 17:45:09DSM014PNQ2007-06-04 17:45:08PG5vYnI+VEFTSyBOT1RFIFBST0ZJTEU6PC9ub2JyPg0KJnF1b3Q7UkVCIG11c3QgYWx3YXlzIGJlIHVwZGF0ZWQgaW4gU
The Properties of the message are
(0x01000000):Properties = (
(0x03000000):MessageSet = 'XXXXX38002001'
(0x03000000):MessageType = 'ABCD_SC_Msg'
(0x03000000):MessageFormat = 'TDS1'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2007-06-04 01:30:16.350'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'0000000000000000000000000000000000000000000
00000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
Thanks,
Vinod |
|
Back to top |
|
 |
vk |
Posted: Mon Jun 11, 2007 8:04 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Hi Vinod,
You can try doing the following. In the input node, specify message domain as BLOB. In a compute node after the input node execute the ESQL -
SET cMessage = CAST(InputRoot.BLOB.BLOB AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId Encoding InputRoot.MQMD.Encoding);
Then you can inspect the data, find out the hexadecimal corresponding to the unreadable character and then replace it with the hexadecimal equivalent for SPACE.
Also, did you try checking the MQGMO_CONVERT option in the MQInput node?
Regards,
VK. |
|
Back to top |
|
 |
vinod_sri |
Posted: Mon Jun 11, 2007 8:48 am Post subject: |
|
|
Apprentice
Joined: 10 Dec 2003 Posts: 42 Location: Atlanta
|
Hi Vk.
Thanks for the reply. I have changed the message domain of the Input Node to BLOB and I executed the ESQL. Still I am getting the same message into the cMessage variable without any conversion. I also checked the convert option in Input Node properties. The flow is able to read the entire message and there is no any unreadable characters I believe. Please correct me if I am wrong.
Thanks
Vinod |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 11, 2007 11:08 am Post subject: Re: Data Conversion |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
vinod_sri wrote: |
The last filed of the message is for comments. These comments are coming in as some weird format. I have no clue what format is that. I am trying to convert these comments to the regular English format. |
So what you're saying is, you're taking a wild guess at converting some randomly formatted data into English, and you're unhappy that you're getting unexpected results.
Maybe you should find out what the format of the data is, before trying to apply a deterministic transformation to it. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|