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 » Insert an XML file into a DB field

Post new topic  Reply to topic
 Insert an XML file into a DB field « View previous topic :: View next topic » 
Author Message
Rockon
PostPosted: Tue Sep 07, 2004 11:38 am    Post subject: Insert an XML file into a DB field Reply with quote

Apprentice

Joined: 24 May 2004
Posts: 43

Hello all,
Isit possible to insert an XML file into a DB2 table field of type "CLOB"?
My requirements are :
Pick up an well-formed XML file(irrespective of the contents) from a Queue and put it into a single DB2 table field of type "CLOB".
I am using DB2v8.1 and WMQI2.1 CSD05
I appreciate if anyone can share their thoughts or approach towards acheiving this.
Thankyou,
Cheers
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Sep 07, 2004 11:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, it's possible.

Do a search here for the word 'asbitstream'.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Sep 07, 2004 10:43 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Rockon wrote:

Pick up an well-formed XML file(irrespective of the contents) from a Queue and put it into a single DB2 table field of type "CLOB".

Are you talking about Reference messages?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
neo_revolution
PostPosted: Wed Sep 08, 2004 12:23 pm    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

I did this way

DECLARE msgBlob BLOB;

SET msgBlob = ASBITSTREAM(InputRoot.XML.logDta OPTIONS FolderBitStream);

and insert it into the BLOB field. 'CLOB' shoulb the same way.

Thanks
Back to top
View user's profile Send private message Yahoo Messenger
kirani
PostPosted: Wed Sep 08, 2004 10:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

You can use CCSID parameter to make it String when inserting into CLOB fields.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
neo_revolution
PostPosted: Thu Sep 09, 2004 4:15 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Just a note regarding InputRoot.XML.logDta, this is a sub-xml tree, which is Rockon's requirement.

Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Thu Sep 09, 2004 5:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

neo_revolution wrote:
Just a note regarding InputRoot.XML.logDta, this is a sub-xml tree, which is Rockon's requirement.

Then it sure would have been nice if he'd been more specific.

Not that it would have changed my answer...

ASBITSTREAM is the function to use, it collapses an entire tree (rooted anywhere in the available trees) into a stream of bits. This can then be treated as character data, if cast appropriately, or treated as binary data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Rockon
PostPosted: Thu Sep 09, 2004 1:53 pm    Post subject: Reply with quote

Apprentice

Joined: 24 May 2004
Posts: 43

Thankyou for all your responses,
I used ASBITSTREAM function.It took some time to figure out ,but it worked like a charm
Cheers
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 » Insert an XML file into a DB field
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.