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 » Some check this code,and reply plz ???

Post new topic  Reply to topic
 Some check this code,and reply plz ??? « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Sat Dec 04, 2004 1:24 am    Post subject: Some check this code,and reply plz ??? Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I have a BLOB domain message flow getting a XML input of
<Name>
<FirstName>ELVIS</FirstName>
<LastName>NINAN</LastName>
</Name>

I want to just get an output as: ELVISNINAN

My ESQL is like this:

CREATE COMPUTE MODULE CIO_TO_DATABASE_MSGFLOW_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE CobolOutput BLOB;
CALL CopyMessageHeaders();

SET CobolOutput = CAST( (InputBody.VehicleInfoRequest.RegistrationNumber || InputBody.VehicleInfoRequest.RegistrationType) AS BLOB CCSID InputRoot.Properties.CodedCharSetId);

SET OutputRoot.BLOB.Vehicle = CobolOutput;
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
END MODULE;

Plz help, i have been stuck with this problem for days now....thx
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Dec 04, 2004 4:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The only valid field under OutputRoot.BLOB is BLOB. You can't use OutputRoot.BLOB.Vehicle, and you can't use any subfields under OutputRoot.BLOB.BLOB either.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wooda
PostPosted: Tue Dec 07, 2004 4:01 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Have you considered using the MRM parser with a CWF message defintion for this ? Because what you appear to have on output is a very simple fixed length message. You will be able to reference individual fields on output and make your ESQL a whole lot simpler esspecially if you any more complicated COBOL structures to output.
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 » Some check this code,and reply plz ???
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.