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 » Trying to right repeating fields to env

Post new topic  Reply to topic
 Trying to right repeating fields to env « View previous topic :: View next topic » 
Author Message
MQ_MQSI_User
PostPosted: Tue Mar 25, 2003 8:39 am    Post subject: Trying to right repeating fields to env Reply with quote

Novice

Joined: 11 Jul 2002
Posts: 20
Location: Charlotte, NC

Can someone please tell me what is wrong with this code...

-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

create field "Environment"."Variables"."Claim"."IBUS-HEADER-366-EM";
DECLARE envarea reference to "Environment"."Variables"."Claim"."IBUS-HEADER-366-EM";

DECLARE INPUTCNT INT;
DECLARE INPUTTOT INT;

SET INPUTTOT = CARDINALITY("InputRoot"."MRM"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[]);
-- SET envarea.COUNTER = INPUTTOT;

SET INPUTCNT = 1;

WHILE INPUTCNT <= INPUTTOT DO
SET envarea."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"."OUT_APPINFO_DEST"[INPUTCNT] = "InputBody"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"."OUT_APPINFO_DEST"[INPUTCNT];
SET envarea."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"."OUT_APPINFO_SEQ1"[INPUTCNT] = "InputBody"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"."OUT_APPINFO_SEQ1"[INPUTCNT];
SET INPUTCNT = INPUTCNT+1;
END WHILE;

SET OutputRoot.BLOB.BLOB = null;

For some reason I am only getting the first repeating field. I have checked the cardinality value and it is 5. I checked the RCD node before this compute node and it is sending all 5 occurences as expected.
_________________
MQSeries, MQSI
Back to top
View user's profile Send private message Send e-mail AIM Address
kirani
PostPosted: Tue Mar 25, 2003 10:00 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Here you go ..

try this,
Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE INPUTCNT INT;
DECLARE INPUTTOT INT;

SET INPUTTOT = CARDINALITY("InputRoot"."MRM"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[]);
SET INPUTCNT = 1;

WHILE INPUTCNT <= INPUTTOT DO
    SET Environment.Variables."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[INPUTCNT]."OUT_APPINFO_DEST" = "InputBody"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[INPUTCNT]."OUT_APPINFO_DEST";
    SET Environment.Variables."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[INPUTCNT]."OUT_APPINFO_SEQ1" = "InputBody"."OUT_HEADER_3"."OUT_APPINFO"."OUT_APPINFO_GROUP"[INPUTCNT]."OUT_APPINFO_SEQ1";
    SET INPUTCNT = INPUTCNT+1;
END WHILE;

_________________
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
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 » Trying to right repeating fields to env
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.