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 » CAST To BLOB on AIX

Post new topic  Reply to topic
 CAST To BLOB on AIX « View previous topic :: View next topic » 
Author Message
matuwe
PostPosted: Wed May 26, 2010 6:41 am    Post subject: CAST To BLOB on AIX Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

Please help, (cry)

I have a file which I am trying to cast to blob and I am getting a short message, compared to if the same test data is pushed to a queue.

This results is the original blob message from a MQinput (No parsing) InputRoot.BLOB.BLOB

X'30303035363132333437353839383030333437393844414e4941202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202031323334353630303131303030323338373038313030303030303154454d504c4154452020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020434851534f4c30303120202020202020202020202020202020202020202020202020202020202020202020202020202020200d0a3030303637383030303735383938303033343739384e49564554484954484120202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202031343732353830303231303030323939393939313030303030303254454d504c4154453220202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020434851534f4c3030352020202020202020202020202020202020202020202020202020202020202020202020202020202020' (BLOB)

This results is from ESQL cast to blob


The difference is , the data here was received from XML XPATH
DECLARE inCCSID INT 1208;
DECLARE inEncoding INT InputProperties.Encoding;
SET Environment.Data = CAST(InputRoot.XMLNSC.ESB_INTERNAL.ESB_DATA.payload AS BLOB CCSID inCCSID ENCODING inEncoding );

X'30303035363132333437353839383030333437393844414e4941202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202031323334353630303131303030323338373038313030303030303154454d504c4154452020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020434851534f4c30303120202020202020202020202020202020202020202020202020202020202020202020202020202020203030303637383030303735383938303033343739384e49564554484954484120202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202031343732353830303231303030323939393939313030303030303254454d504c4154453220202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020434851534f4c303035' (BLOB)

The input message is data is identical

What am I doing wrong..
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 26, 2010 7:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What does a usertrace show?

What is producing the results you have shown? A Trace node? User trace? an output message?
Back to top
View user's profile Send private message
matuwe
PostPosted: Thu May 27, 2010 9:27 am    Post subject: Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

Yes I created a trace node, then read the blob from the trace node (file output) If I remove the CCSID 1208 to InputRoot. CCSID then it seems to look identical. One last thing I saw was the missing part of the BLOB is actually spaces at the end of the last line.

I am not doing any trim, could this be caused by CAST to BLOB with CCSID 1208?

Please help, I am not sure what CCSID actually does. My real problem is I am parsing using ESQL, If I read this peace of data from XPATH value in the incoming DATA, the I get PARSE Vaidation error. But if I copy the data and send it directly to a flow using a MQInput Node that receives BLOB , then the same PARSE code works.
Back to top
View user's profile Send private message
matuwe
PostPosted: Thu May 27, 2010 9:45 am    Post subject: Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

The difference is the stand alone flow is
MQInput >> Compute node (PARSE and Validate) >> XSLT >> MQOUT and it works

The second one is MQInput >> Comput node read data from DB >> PARSE one XPATH value(same as previouse >> XSLT >> MQout.

The dataand msgset is totally the same. I read it from the database as charecters no trim, and I thought casting to blob might help

Code:


      SET Environment.Data = InputRoot.XMLNS.ESB_INTERNAL.ESB_DATA.payload;
       DECLARE parseOptions INTEGER BITOR (ValidateContentAndValue,ValidateException,ValidateImmediate);
      Create LASTCHILD OF Environment.TEST DOMAIN ('MRM') PARSE(Environment.Data
      OPTIONS parseOptions
      SET procedurename
      TYPE msgTYPE
      FORMAT msgFORMAT
      ENCODING InputRoot.Properties.Encoding
      CCSID  InputRoot.Properties.CodedCharSetId
      );

Back to top
View user's profile Send private message
inMo
PostPosted: Thu May 27, 2010 9:54 am    Post subject: Reply with quote

Master

Joined: 27 Jun 2009
Posts: 216
Location: NY

Perhaps you have solved this? If not, try using

Code:
CCSID  InputRoot.Properties.CodedCharSetId


in the cast statement instead of '1208'.
Back to top
View user's profile Send private message
matuwe
PostPosted: Thu May 27, 2010 10:08 am    Post subject: Reply with quote

Master

Joined: 05 Dec 2007
Posts: 296

yes i have and my data looks better, But now I am still getting an error on PARSE, as the messageset gives a validation error on data that validates fine on MQInput? I guess I am asking a million questions on one line.

1. If I am doing a PARSE in ESQL, do I need to send BLOB data or can it be anything (BLOB or CHARECTER) ?
2. If I am doing a CAST to BLOB, why does the empty spaces at the end of data gets trimed (removes spaces)
3. Does the field type on my xml cause this?

The only puzzle for me, is this works with any data but only 3 rows (datafiles) fail's.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 27, 2010 11:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

1. Either will work, although the info center will claim that you can only use BLOB.
2. and 3. I don't fully understand the questions, but I'm fairly sure that you could answer these questions for yourself by taking mqjeff's advice and taking a user trace. Or use the debugger to step through the ESQL.
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 » CAST To BLOB on AIX
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.