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 » blob data storage in database

Post new topic  Reply to topic
 blob data storage in database « View previous topic :: View next topic » 
Author Message
piyalida
PostPosted: Mon Apr 05, 2004 10:12 am    Post subject: blob data storage in database Reply with quote

Novice

Joined: 21 Oct 2002
Posts: 22
Location: New York

Hi,
I've a strange problem with storing and retrieving data from DB2 Mainframe database thru MQSI broker running on Mainframe.
This is the code to store data into a VARCHAR field in database ,length -4000.


--declares a local variable of type BLOB which will hold the input message

DECLARE msgdata BLOB;

SET msgdata = asbitstream(Body,546,437);


INSERT INTO Database.MQSI02.STATETBL
(----, msgdata);

The incoming message is a XML.The retrieving code is as :

SET OutputRoot.MQMD.MsgId = InputRoot.MQMD.CorrelId;



DECLARE msgBlob BLOB;
SET msgBlob = THE (SELECT ITEM
A.MSGDATA FROM Database.MQSI02.STATETBL AS A WHERE A.MSGID = InputRoot.MQMD.CorrelId );
CREATE LASTCHILD of OutputRoot DOMAIN 'XML' PARSE (msgBlob, 546, 437);


The code works fine but for a particular length of message -1001 bytes.
The last char of the message should have been a '>' for the closing bracket of the xml but is coming back as x'00' (on retrieval from database)thus making it an invalid xml.If the length is 1000 bytes,it works fine,1002 it also fine though there is a difference in a way that 1000 byte gets stored as against 1002 bytes.1002 byte gets stored as 2004 bytes i.e original value of 1002 + x'00'(1002 bytes) while 1000 bytes occupy just 1000 places in the database.The problem is with only Mainframe,the same code in a Windows environment works fine.

Any help will be appreciated.
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » blob data storage in database
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.