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 » Problem with REFERENCE TO OutputRoot

Post new topic  Reply to topic
 Problem with REFERENCE TO OutputRoot « View previous topic :: View next topic » 
Author Message
Bosco
PostPosted: Thu Apr 01, 2004 5:26 pm    Post subject: Problem with REFERENCE TO OutputRoot Reply with quote

Novice

Joined: 30 Nov 2003
Posts: 17

Hi,

I try to create a common procedure contained in a Broker Schema that can be called by others. Here is the msgflow:

MQInput(XML)->Compute->Trace->MQOutput

Here is my codes in a Compute node before output to a MQOutput node:

DECLARE refA REFERENCE TO OutputLocalEnvironment.Variables;
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.ReplyToQ = 'Test.Queue.Reply';
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.StrucId = MQMD_STRUC_ID;
SET OutputRoot.MQMD.Format = MQFMT_STRING;
SET OutputRoot.MQMD.CorrelId = OutputRoot.MQMD.MsgId;
SET OutputRoot.Properties.MessageSet = 'K66RJMO002001';
SET OutputRoot.Properties.MessageType = 'msg_Test';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageFormat = 'CWF1';
DECLARE refOutputRoot REFERENCE TO OutputRoot;
CALL bsTest.Compose(refA, refOutputRoot);

CREATE PROCEDURE Compose(IN refA REFERENCE, INOUT refOutputRoot REFERENCE)
BEGIN

SET refOutputRoot.MRM.Field1 = 'A';
SET refOutputRoot.MRM.Field2 = 'B';
END;

When I put a message to the flow, a message without the body is written to the output queue. I notice is that the MQ message format is space.

It works OK if I put the codes in the procedure in the Compute node without calling procedure. Does anyone know what is the problem?


I am using WBIMB V5.0.3

Bosco
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Apr 02, 2004 12:03 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

If you search this forum you should find a post from me decribing the difference between OutputRoot and a Reference to OutputRoot.

However as you are using version 5 of the brokers, you should know that the root Correlation Names (OutputRoot etc) are now effectively Implicitly Declared Module Level Variables. This means that you can use them in functions and procedures that are written at module (but not schema) scope without having to pass them in as a reference.

Cheers,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
aks
PostPosted: Wed May 19, 2004 4:07 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

Can esql be split up into separate esql files and still remain (and be referenced) at module level?

I have a flow which is similar to what has been described, ie OutputRoot etc not having to be passed into procedures, but the procedures are in the same esql file and it is getting large and unmanageable. I would like to take these procedures and make individual files, but still have the benefit of not having to pass in OutputRoot. I can use a broker schema, but would then have to pass in a reference to OutputRoot.
Thanks
Alan
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 » Problem with REFERENCE TO OutputRoot
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.