|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Is referencing fields ouside a loop allowed? |
« View previous topic :: View next topic » |
Author |
Message
|
tbt102 |
Posted: Sun May 11, 2003 4:04 pm Post subject: Is referencing fields ouside a loop allowed? |
|
|
Apprentice
Joined: 21 Apr 2003 Posts: 28
|
Hi all,
I'm trying to reference fields outside a loop. See sample code below. When I do the message BIP2432E is displayed when I deploy. See full message below.
Is referencing fields ouside a loop allowed? If not, is there a way to expose the fields outside the loop.
Thanks in advance for any help.
DECLARE blobCF99 BLOB;
WHILE LASTMOVE (refInput) = TRUE DO
IF refInput."INPUT_CF01" <> 0 THEN
SET blobCF99 = refInput."INPUT_CF01";
CALL WriteOutMesg(blobCF99);
ELSE
SET intRecNotProcessed = intRecNotProcessed + 1;
END IF;
IF refInput."INPUT_CF01" <> 0 THEN
SET blobCF99 = refInput."INPUT_CF01";
CALL WriteOutMesg(blobCF99);
ELSE
SET intRecNotProcessed = intRecNotProcessed + 1;
END IF;
MOVE refInput NEXTSIBLING;
END WHILE;
CREATE PROCEDURE WriteOutMesg(IN blobCF99 BLOB)
BEGIN
SET "OutputRoot"."MRM"."OUTPUT"[intNextMesgOut]."OUTPUT_FC_ARTNR" = refInput."INPUT_ARTNO";
SET "OutputRoot"."MRM"."OUTPUT"[intNextMesgOut]."OUTPUT_FC_FC" = blobCF99;
SET intNextMesgOut = intNextMesgOut + 1;
END;
BIP2432E: (58, 6) : The correlation name 'OutputRoot' is not valid. Those in scope are: , blobCF99.
The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.
Correct the syntax of the expression and redeploy the message flow. |
|
Back to top |
|
 |
kirani |
Posted: Sun May 11, 2003 6:40 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I don't think you can refer to Output/Input tree into PROCEDURE directly. Take a look at following thread, which explains how to pass Environment Tree to the procedure. You could do something similar.
http://www.mqseries.net/phpBB2/viewtopic.php?t=8503&highlight=procedure _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
tbt102 |
Posted: Tue May 13, 2003 5:11 am Post subject: |
|
|
Apprentice
Joined: 21 Apr 2003 Posts: 28
|
Hi kirani,
I understand what is going on in the link above. However, I am having all kinds of problems trying to implement. I'll start with the first one and maybe the others will clear up. Hope you don't mind. Thanks.
SET "OutputRoot"."MRM"."OUTPUT"[1]."OUTPUT_FC_ARTNR" = '';
SET "OutputRoot"."MRM"."OUTPUT"[1]."OUTPUT_FC_FC" = '';
SET intNextMesgOut = 1
.
.
CALL WriteOutMesg(Environment, blobCF99, intNextMesgOut);
CREATE PROCEDURE WriteOutMesg(IN Environment REFERENCE, IN blobCF99 BLOB,
IN intNextMesgOut INTEGER)
BEGIN
DECLARE WriteoutmesgRoot REFERENCE TO Environment.WriteOutMesg[intNextMesgOut];
Error message: Failed to navigate to path element because it does not exist. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|