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 » WebSphere Message Broker (ACE) Support » CLOB to original format conversion

Post new topic  Reply to topic
 CLOB to original format conversion « View previous topic :: View next topic » 
Author Message
Halloween
PostPosted: Fri Nov 06, 2015 8:08 am    Post subject: CLOB to original format conversion Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

Hello,

I am retrieving the data from Record and Replay Database. The default format that the database is stored in Record and Replay is CLOB. Now i am retrieving the data from the Record and replay database, the actual payload in compute node.

I want to know how can i parse or convert the CLOB into original format. I tried Base64encoding, CCSID and Encoding trail and error combination but still gives me gibberish data. I want to convert it to original format before it got posted to Record and Replay database in CLOB format
Back to top
View user's profile Send private message
timber
PostPosted: Fri Nov 06, 2015 12:18 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

What do you mean by 'original format'? Do you want
a) the original bytes or
b) a message tree exactly like the original flow would have constructed?
Quote:
I tried Base64encoding, CCSID and Encoding trail and error combination
Hmmm. Did you try it while standing on your left leg and scratching your left ear with your right big toe?
Seriously, not many software problems have been solved ( correctly ) by trial and error. A lot of serious defects have been written that way, though.
Back to top
View user's profile Send private message
Halloween
PostPosted: Tue Nov 10, 2015 11:33 am    Post subject: Clob to String Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 60

Hello Timber,

Thanks for reply.
I meant to convert into original tree structure.
Record and Replay database stores the incoming message of any format in CLOB format. I want to fetch that database and convert it back to the way it was before it got converted into CLOB and was stored into Record and Replay database.

Thanks,
Halloween
Back to top
View user's profile Send private message
timber
PostPosted: Wed Nov 11, 2015 12:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Work backwards from what you know. You need to parse something into a message tree. So that 'something' will need to be a BLOB ( a sequence of bytes ). But you are getting a CLOB ( a sequence of characters ) from the database.
So you need to
1. Find out what the CLOB contains. Possible answers are 'the message body' or 'the entire message'. You may need to look at the monitoring config in the originating message flow(s) to answer this one
2. Find out what format the CLOB is in. Possible answers are 'base64Binary' or 'hexBinary'. It should be fairly easy to tell just by looking at the characters ( hexBinary only contains 0..9,A..F whereas base64 contains 64 different characters ).

Now you have enough information to turn the CLOB into a BLOB.
Next step is to parse that BLOB into a message tree...

3. Find out the format of the data. That may require you to look at the specification of the originating message flow.
4. Write a CREATE...PARSE statement to parse the BLOB into a message tree. Or, if the format is always the same you could use an RCD node.

As always, if you get stuck then tell us exactly what you did, and quote any error messages in full.
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 » WebSphere Message Broker (ACE) Support » CLOB to original format conversion
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.