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 » Search and delete specific fields in a unknown msg tree

Post new topic  This topic is locked: you cannot edit posts or make replies.
 Search and delete specific fields in a unknown msg tree « View previous topic :: View next topic » 
Author Message
venanciorb
PostPosted: Tue Jul 23, 2013 7:45 am    Post subject: Search and delete specific fields in a unknown msg tree Reply with quote

Newbie

Joined: 29 Aug 2011
Posts: 7

Hello!

I need to navigate in a unknown message tree and if I find some particular fields(fields like fill_*) I need to delete it.

I did a code to navegate in the message, but now I don't know how to delete the fields. See the code below:
Code:

      DECLARE pathFieldName CHARACTER;
            
      WHILE LASTMOVE(pathRef) DO

         WHILE LASTMOVE(pathRef) DO
   
            WHILE LASTMOVE(pathRef) DO
   
               SET pathFieldName = FIELDNAME(pathRef);
                  
               IF CONTAINS(pathFieldName, 'fill_') THEN

                  -- how to DELETE the FIELD ????

               END IF;
            
               MOVE pathRef FIRSTCHILD;
               
               IF LASTMOVE (pathRef) IS NOT TRUE THEN
                  
                  SET NOCHILD = 1;
                  
               END IF;   
         
               SET pathFieldName = FIELDNAME(pathRef);            
         
            END WHILE;
            
            MOVE pathRef NEXTSIBLING;
            
            IF (LASTMOVE (pathRef) IS NOT TRUE) AND (NOCHILD = 1) THEN
                  
               MOVE pathRef PARENT;
               MOVE pathRef NEXTSIBLING;
                  
            END IF;   
            
            SET NOCHILD =0;
                     
            SET pathFieldName = FIELDNAME(pathRef);         

      END WHILE;
      
      MOVE pathRef NEXTSIBLING;

   END WHILE;



Sample message tree:
<NU_CNAE>0</NU_CNAE>
<fill_1></fill_1>
<TEST>
<CAMPO1></CAMPO1>
<CAMPO2></CAMPO2>
<fill_2></fill_2>
<CAMPOX>X</CAMPOX>
</TEST>


I'll really appreciate any help.

Thanks. Roger
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 23, 2013 8:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Locked as a duplicate of this
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Search and delete specific fields in a unknown msg tree
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.