|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
InputRoot.XMLNS is trancated |
« View previous topic :: View next topic » |
Author |
Message
|
ameya_nayak |
Posted: Tue Aug 06, 2013 9:01 am Post subject: InputRoot.XMLNS is trancated |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Hi
we are plaaning to store entire XML tree into database table using Compute node.The problem which we are facing is the tree structure is too big so its unable to save it into database
We are using below statement for getting and storing xml file into database
DECLARE Msg CHARACTER;
DECLARE MsgBlob BLOB;
SET MsgBlob = ASBITSTREAM(InputRoot.XMLNS);
If the XML size is samll then we are store it into datase without any error but id the size is large then we are facing problem.
Whats the solution to store XML file which is in size of 34 KB into database
using compute node.
Thanks |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 06, 2013 9:05 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
First, don't use blob. Use XMLNSC parser.
Second, You need options ROOTBITSTREAM.
Third, it seems you are not fully versed on the skills and capabilities one needs to do message flow development. What's your plan to acquire this skill? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 06, 2013 9:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Just because a field is a BLOB or CLOB in a database, doesn't necessarily mean that it's capable of holding a significantly large chunk of data.
You do clearly need to use an ESQL blob variable to hold a bitstream.
You do clearly need to use the right parser options on the ASBITSTREAM to ensure that you get the right thing out, including using RootBitStream if that's what you're trying to do.
You should be using XMLNSC instead of XMLNS in all cases.
Otherwise, if you're getting an error doing something, or a result that's unexpected, you should troubleshoot it.
Start by asking the DBA. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Aug 06, 2013 9:46 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
What database ? some databases support XML data type, for example db2 v9.1
but I agree with mqjeff and lancelotonic, need to use RootBitstream and specify a CCSID , normally 1208
Need to make sure the database column is defined with the correct data type. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 06, 2013 10:09 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I save messages a lot bigger than 34Kb into a DB table all the time.
In this case, the DB is SQLServer and the column is defined as a nvarchar(max) type.
Once you have converted the XMLNSC message to a BLOB then you need to conver that to a CHAR type if you are using the nvarchar data type.
If you are using DB2 (8.2) then you have to create a proper TableSpace for BLOBS. There are also some things you have to for Oracle DB's.
You really need to understand how your DB type can store BLOB's or large CHAR Types before you start writing ESQL. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
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
|
|
|
|