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 » How to define and manipulate global REFERENCE variable?

Post new topic  Reply to topic
 How to define and manipulate global REFERENCE variable? « View previous topic :: View next topic » 
Author Message
m.schneider
PostPosted: Wed Jun 13, 2007 11:56 pm    Post subject: How to define and manipulate global REFERENCE variable? Reply with quote

Centurion

Joined: 10 Apr 2007
Posts: 132
Location: Germany

Hello everyone,

I am trying to define a global variable and to manipulate the variable in a function. Debugging the flow I do not see the variable and it is also not set in the function.

Here is the code:

CREATE COMPUTE MODULE receive_MT541_SWIFT2XML

DECLARE rInData REFERENCE TO InputRoot.*; --just some dummy value

CREATE FUNCTION main() RETURNS BOOLEAN
BEGIN
IF InputRoot.MRM.FIN.FIN_INPUT_SWAH.Message_Type = '541' THEN
Set rInData = InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541";
END IF;
...

The Set in the main function does not work, ...

Any advice?

Thanks
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu Jun 14, 2007 12:11 am    Post subject: Re: How to define and manipulate global REFERENCE variable? Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

m.schneider wrote:

The Set in the main function does not work, ...

Any advice?

Thanks



What does it mean ?
What is value of rInData ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
m.schneider
PostPosted: Thu Jun 14, 2007 10:53 pm    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2007
Posts: 132
Location: Germany

The content of rInData is

Quote:
DECLARE rInData REFERENCE TO InputRoot.*;



But the variable is not set to InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541" in the main function.

I just want to manipulate a global variable in a function, ....
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu Jun 14, 2007 11:03 pm    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Are you sure that InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541" exists ?

What is return of FILEDNAME(rInData) ?

Place trace node before Compute and check entire message.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Thu Jun 14, 2007 11:05 pm    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

And another thing...

Check IF condition.

Does InputRoot.MRM.FIN.FIN_INPUT_SWAH.Message_Type equals 541 ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
m.schneider
PostPosted: Thu Jun 14, 2007 11:37 pm    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2007
Posts: 132
Location: Germany

You do not get my problem.

My problem are not the definitions they work fine, problem is that if I try to manipulate a global variable in a function the variable is not set!

If I do the following DECLARE rInData REFERENCE TO InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541";

at modul level everything works fine
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Fri Jun 15, 2007 12:17 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

m.schneider wrote:
You do not get my problem.

My problem are not the definitions they work fine, problem is that if I try to manipulate a global variable in a function the variable is not set!

If I do the following DECLARE rInData REFERENCE TO InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541";

at modul level everything works fine



Ups sorry. Now I see.

Have you tried :

Code:
MOVE rInData to InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541";


instead of

Code:
Set rInData = InputRoot."MRM"."FIN"."TEXT_BLOCK"."MT541";

_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
m.schneider
PostPosted: Tue Jun 19, 2007 3:55 am    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2007
Posts: 132
Location: Germany

Thanks a lot, Move does the magic

Anyhow, where do I get this kind of information? I am missing a good tutorial, ... the information center is ok as a reference but to learn!?
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue Jun 19, 2007 4:03 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

m.schneider wrote:
Thanks a lot, Move does the magic

Anyhow, where do I get this kind of information? I am missing a good tutorial, ... the information center is ok as a reference but to learn!?


I think it is in description of MOVE function.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05090_.htm
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to define and manipulate global REFERENCE variable?
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.