Posted: Fri May 04, 2012 3:27 am Post subject: Repeat Reference issue
Acolyte
Joined: 14 Apr 2012 Posts: 58
Hi all
this is regarding Repeat reference,
In the message deffinition file, message elements are NO,NAME.
NAME will repeat reference to No.
the ESQL code is
Code:
CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet ='ARMAMOO002001';
SET OutputRoot.Properties.MessageType ='RESULT';
SET OutputRoot.Properties.MessageFormat ='XML1';
DECLARE no,count INTEGER;
SET no =InputRoot.MRM.NO;
SET count =1;
WHILE (count <= no) DO
CREATE OutputRoot.XML.RESULT.DATA.NO[count]= count;
SET OutputRoot.XML.RESULT.DATA.NAME[count]=InputRoot.MRM.NAME[count];
CREATE FIRSTCHILD OF OutputRoot.XML.RESULT.DATA Domain('MRM') NAME 'NO' VALUE 'count';
CREATE LASTCHILD OF OutputRoot.XML.RESULT.DATA Domain('MRM') NAME 'NAME' VALUE 'InputRoot.MRM.NAME[count]';
Your problem is probably nothing to do with the message set - the parsing seems to have worked OK. You now have a message tree in InputRoot.MRM. You need to create a different message tree under OutputRoot.XMLNSC.
Your next steps should be:
- Switch to XMLNSC
- Put in Trace nodes so that you can see the structure of the message tree
- Take a user trace so that you can see what your ESQL is actually doing to that message tree.
- Say 'ah, of course. Now I see what is wrong with my ESQL!'
- Fix the problem
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