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 » Referencing elements in RFH2

Post new topic  Reply to topic
 Referencing elements in RFH2 « View previous topic :: View next topic » 
Author Message
j1
PostPosted: Thu Oct 28, 2004 1:36 pm    Post subject: Referencing elements in RFH2 Reply with quote

Centurion

Joined: 23 Jun 2003
Posts: 139

Hi,

I have a requirement to reference an element within the RFH2 header but the tag coming before it may change. For example.

it may be

InputRoot.MQRFH2.<something>.C

what kind of wildcard char do i need to put in to reference C.

Thanks,
Sailesh
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Oct 28, 2004 1:45 pm    Post subject: Reply with quote

Jedi Knight

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

What is the position of this <something> element in your Tree? Is it the last element always? If so, you can use Anonymous field references like this,
Code:

InputRoot.MQRFH2.*[LAST].C

_________________
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
j1
PostPosted: Thu Oct 28, 2004 1:48 pm    Post subject: Reply with quote

Centurion

Joined: 23 Jun 2003
Posts: 139

it will be in the same position.

for eample, it may be :

InputRoot.MQRFH2.A.C

or

InputRoot.MQRFH2.B.C

would a

InputRoot.MQRFH2.[*].C

work?

thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Oct 28, 2004 1:55 pm    Post subject: Reply with quote

Jedi Knight

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

What I ment was we need to know the position of this <something> element in MQRFH2 tree. For example, it could be the 3rd or last child of MQRFH2 tree? Can you print your ${Root} in a trace file and post the output here?
_________________
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
j1
PostPosted: Thu Oct 28, 2004 2:05 pm    Post subject: Reply with quote

Centurion

Joined: 23 Jun 2003
Posts: 139

i dont want to post the ${Root} but the <something> tag will always be at the same position, in this case the top level element after RFH2. basically we are putting an XML tree into the RFH2 and the elements after the top level tag will be the same and i can reference them explictly, but need a wildcard for the top level element.
Back to top
View user's profile Send private message
siliconfish
PostPosted: Thu Oct 28, 2004 2:14 pm    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

Looks like u will have only one top level element after MQRFH2. Use InputRoot.MQRFH2.*[LAST].C as suggested by kiran.
_________________
siliconfish
Back to top
View user's profile Send private message
Nizam
PostPosted: Thu Oct 28, 2004 2:25 pm    Post subject: Reply with quote

Disciple

Joined: 10 Feb 2004
Posts: 160

I guess
declare Ref REFERENCE TO InputRoot.MQRFH2.*[];
should work.
[2] refers to your 'c'.
Back to top
View user's profile Send private message
j1
PostPosted: Thu Oct 28, 2004 2:30 pm    Post subject: Reply with quote

Centurion

Joined: 23 Jun 2003
Posts: 139

it will always be the third child of the Tree. either way i guess an anonymous field reference to either

InputRoot.MQRFH2.[3]*.C

or

InputRoot.MQRFH2.[LAST]*.C

will be the answer..

Thanks for the help
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Oct 28, 2004 3:18 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

And if you are running v5:
Quote:
For backward compatibility the LAST keyword is still supported, but its use is deprecated.

The LAST keyword has been replaced by the following arrow syntax, which allows both a direction of search and index to be specified:

Field [ > ] -- The first element, equivalent to [ 1 ]
Field [ > (a + b) * 2 ]
Field [ < ] -- The last element, equivalent to [ LAST ]
Field [ < 1 ] -- The last element, equivalent to [ LAST ]
Field [ < 2 ] -- The last but one element Field
[ < (a + b) / 3 ]


Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Referencing elements in RFH2
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.