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 » General Discussion » Message Format not set in MQOutput

Post new topic  Reply to topic
 Message Format not set in MQOutput « View previous topic :: View next topic » 
Author Message
meenas
PostPosted: Tue Dec 06, 2005 3:23 am    Post subject: Message Format not set in MQOutput Reply with quote

Newbie

Joined: 30 Nov 2005
Posts: 5

Hi All,
I'm new to WBIMB and learning the tool myself. Please help me with the following problem.
I have created a simple message flow(MQInput -> Compute -> MQOutput) where I'm mapping data from an incoming XML to a custom wire format. I don't see any errors but the message in MQOutput Node is of length 0. The Format property of the message in the queue is also not set.

Here is my code:
CREATE COMPUTE MODULE XML2CWF_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
DECLARE MyOutput REFERENCE TO OutputRoot.MRM;
MyOutput.Field1 = 'aaa';
-- Similarly I have mapped other fields.
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;
SET OutputRoot.MQMD.StrucId = MQMD_STRUC_ID;
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.Format = MQFMT_STRING;
SET OutputRoot.MQMD.CodedCharSetId = 437;
SET OutputRoot.MQMD.Encoding = 546;

SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = 'PKFE34G002001';
SET OutputRoot.Properties.MessageType = 'REQMSG';
SET OutputRoot.Properties.MessageFormat = 'CWF1';

END;

I'm I doing anything wrong while mapping? In the Trace node I'm able to see that all the fields have been mapped correctly.

Would appreciate you suggestion.

Thanks & Regards,
Meena.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 06, 2005 4:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think your MyOutput reference doesn't point to anything.

Post a trace of the message before the MQOutput.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Tue Dec 06, 2005 9:04 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

As Jeff stated, you can't reference something that doesn't exist.

Code:
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM';
DECLARE MyOutput REFERENCE TO OutputRoot.MRM;
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 » General Discussion » Message Format not set in MQOutput
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.