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 » Moving group of fields to another field

Post new topic  Reply to topic
 Moving group of fields to another field « View previous topic :: View next topic » 
Author Message
rajasri
PostPosted: Fri Feb 16, 2007 2:11 am    Post subject: Moving group of fields to another field Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

Hi all, i have a problem of moving a group of fields present under Environment as children of a field in OutputRoot. ex:

Environment
-- Folder1
--Field1
--Field2
--Field3
--Field4

My output should have
OutputRoot
--FirstChild
-- XXXX
--YYYY
--Field1
--Field2
--Field3
--Field4.


I am able to do this by having a while loop like this

Move tempRef to Environment.Folder1.Field1;
MOve outputFieldRef To OutputRoot;
WHILE LASTMOVE(tempRef) DO
CREATE LASTCHILD OF outputFieldRef AS outRef NAME FIELDNAME(tempRef);
SET outRef = tempRef;
MOVE tempRef NEXTSIBLING;
END WHILE;

Is there any way to do the same with out using any while loop. The reason of not being interested in while loop is already Field1, Field2 ...are created inside Folder1. Then some how i should be able to move them directly under the OutputRoot. Something like a Bulk Copy-Pasting.
Is there any way to do this. Thanks in advance.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Feb 16, 2007 2:35 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rajasri,

Associate your Environment tree with a parser first...search the forum for Environment + parser...

Then try a
Code:
CREATE LASTCHILD OF outputFieldRef FROM Environment.Folder1.*;
Not tested, hopefully it will work, else try a DETACH ATTACH also.

Regards.
Back to top
View user's profile Send private message Send e-mail
rajasri
PostPosted: Fri Feb 16, 2007 4:14 am    Post subject: copying groups of fields Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

Hi Elvis, i have tried the syntax given by you, but only the first field inside Folder1 is getting copied into the Output. i.e. my output is like this

OutputRoot
--FirstChild
-- XXXX
--YYYY
--Field1



iam loosing the other fields that must follow Field1. And i dont understand the real use of FROM clause after seeing the output.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Feb 16, 2007 4:29 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rajasri,

I think my mistake was the '*'. Remove that...use Environment.Folder1 alone.

If it works, then we can discuss what FROM can do

Regards.
Back to top
View user's profile Send private message Send e-mail
rajasri
PostPosted: Fri Feb 16, 2007 4:42 am    Post subject: COPYING Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

I tried that also Elvis, but the out put will be

OutputRoot
--FirstChild
-- XXXX
--YYYY
--Folder1
--Field1
--Field2
--Field3
--Field4.
My observation is It takes the field pointed the reference and copies it to the output. But our problem is we dont want that field but the children of the field. If i say Environment.Folder1.* then first child of Folder1 is copied to output. If i say Environment.Folder1 then Folder1 field will be copied to the output.
Back to top
View user's profile Send private message
rajasri
PostPosted: Fri Feb 16, 2007 4:44 am    Post subject: Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

my output should have been more clear. here is how it looks


OutputRoot
--FirstChild
------ XXXX
------YYYY
------Folder1
-------------Field1
-------------Field2
-------------Field3
-------------Field4.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Feb 16, 2007 4:59 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rajasri,

For the inquisitive kind that I am, I would have tried Environment.Folder1.*[] too, I hope you did too

If that too does not work, then you should try a DETACH ATTACH...

Btw, did you associate your Environment tree with a parser ?

Regards.
Back to top
View user's profile Send private message Send e-mail
rajasri
PostPosted: Fri Feb 16, 2007 5:05 am    Post subject: Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

Yes Elvis, i have tried that option too and even before posting the question in forum i have tried attach and detach. And i am getting the same output as showed you in the last post. I really dont understand the use FROM clause. Now atleast i hope you will tell me what its actual use is. And i also dint understand the need of parser. could you pleas explain that also.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 17, 2007 6:44 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

rajasri wrote:
Yes Elvis, i have tried that option too and even before posting the question in forum i have tried attach and detach. And i am getting the same output as showed you in the last post. I really dont understand the use FROM clause. Now atleast i hope you will tell me what its actual use is. And i also dint understand the need of parser. could you pleas explain that also.


If you do not define a parser where you "park" the tree, the tree's integrity is not guaranteed. So if you park the xml tree in the environment you should do something like this:
Code:
Create last child of Environment.Data.User domain 'XMLNS' name 'XMLNS';
SET Environment.Data.User.XMLNS = myxmlref;


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rajasri
PostPosted: Sun Feb 18, 2007 8:35 pm    Post subject: Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

Hi Elvis, i have seen this in the documentation:::

FROM expressions in which a correlation variable represents a row in a message behave slightly differently from those in which the correlation variable represents a row in a real database table.

In the message case, a path involving a star (*) has the normal meaning; it ignores the field's name and finds the first field that matches the other criteria (if any).

In the database case a star (*) has, for historical reasons, the special meaning of "all fields". This special meaning requires advance knowledge of the definition of the database table and is only supported when querying the default database (that is, the database pointed to by the node's data source attribute).

I think this is what is happening for me. iam getting only one field that is the first field. And i feel my requirement cant be satisfied.
Back to top
View user's profile Send private message
bhaski
PostPosted: Fri Apr 13, 2007 9:42 am    Post subject: Reply with quote

Voyager

Joined: 13 Sep 2006
Posts: 78
Location: USA

Hi

Pls let me know what is your actual Input and your expected output?

Bhaski.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Apr 13, 2007 10:18 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi bhaski,

I don't think anyone would wait 1 month for a solution...

Quote:
Posted: Fri Feb 16, 2007 3:41 pm


Regards.
Back to top
View user's profile Send private message Send e-mail
recallsunny
PostPosted: Fri Apr 13, 2007 12:38 pm    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Moving group of fields to another field
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.