Author |
Message
|
m.schneider |
Posted: Wed Jun 13, 2007 11:56 pm Post subject: How to define and manipulate global REFERENCE variable? |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Thu Jun 14, 2007 12:11 am Post subject: Re: How to define and manipulate global REFERENCE variable? |
|
|
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 |
|
 |
m.schneider |
Posted: Thu Jun 14, 2007 10:53 pm Post subject: |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Thu Jun 14, 2007 11:03 pm Post subject: |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Thu Jun 14, 2007 11:05 pm Post subject: |
|
|
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 |
|
 |
m.schneider |
Posted: Thu Jun 14, 2007 11:37 pm Post subject: |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Fri Jun 15, 2007 12:17 am Post subject: |
|
|
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 |
|
 |
m.schneider |
Posted: Tue Jun 19, 2007 3:55 am Post subject: |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Tue Jun 19, 2007 4:03 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
|
Back to top |
|
 |
|