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 » tab delimated output under v2.0.2

Post new topic  Reply to topic
 tab delimated output under v2.0.2 « View previous topic :: View next topic » 
Author Message
m00300
PostPosted: Thu May 02, 2002 1:25 am    Post subject: Reply with quote

Apprentice

Joined: 01 May 2002
Posts: 31

Hi,

I'm trying to work out how to write out tab delimited character output under MQSI v2.0.2
Tried a number of tests using BLOB with X'10' but cant work out how to combine them with printable characters.

Looking at other threads here it looks like TREEASIS may allow this - will this help ?

I dont have TREEASIS support pack installed yet....

Thanks,
Kevin.
Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Sun May 05, 2002 7:18 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

You can define a tab-delimited structure in MRM using
NULL-terminated strings. Then you map your onto this MRM
message in a compute node and transform it into a BLOB
using another (you can't do it all in one compute node)
compute node, like this:

SET OutputRoot.Properties.MessageDomain = 'BLOB';
SET OutputRoot."BLOB"."BLOB" = BITSTREAM(InputBody);

-- convert NULLS to TABS

DECLARE delimiter BLOB;
DECLARE pos INTEGER;
SET delimiter = X'10'; -- whatever delimiter you like

SET pos = POSITION(OutputRoot."BLOB"."BLOB",X'00');
WHILE (pos > 0) DO
SET OutputRoot."BLOB"."BLOB" = OVERLAY(OutputRoot."BLOB"."BLOB" PLACING delimiter FROM pos FOR 1);
SET pos = POSITION(OutputRoot."BLOB"."BLOB",X'00');
END WHILE;



_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
m00300
PostPosted: Wed May 22, 2002 1:56 am    Post subject: thanks for the suggestion.... Reply with quote

Apprentice

Joined: 01 May 2002
Posts: 31

but i'm not sure this would work in my case as my tab delimted output is totally dependant on the incoming XML message structure and a set of ESQL transformations which would make constructing an MRM defination of the outgoing tab delimeted message impossible.

however i did manage to get solve this using TREEASIS - see folowing code snipet :

DECLARE c_TAB BLOB;
DECLARE J INTEGER;
DECLARE K INTEGER;
DECLARE v_Card INTEGER;

SET c_TAB = X'10';
-- incoming message tag count
SET v_Card = CARDINALITY(InputRoot.XML.ZOO.Value[]);

SET J = 1;
SET K = 1;
WHILE J <= v_Card DO
SET OutputRoot.TREEASIS.Value[K] = InputRoot.XML.ZOO.Value[J];
SET K = K + 1;
SET OutputRoot.TREEASIS.Value[K] = c_TAB;
SET K = K + 1;
SET J = J + 1;
END WHILE;

SET K = K - 1;

IF K > 0 THEN

SET OutputRoot.TREEASIS.Value[K] = NULL;

END IF;
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » tab delimated output under v2.0.2
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.