|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Fieldname question |
« View previous topic :: View next topic » |
Author |
Message
|
schroederms |
Posted: Wed Mar 12, 2008 12:28 pm Post subject: Fieldname question |
|
|
 Disciple
Joined: 21 Jul 2003 Posts: 169 Location: IA
|
I'm trying to get the tag name after the R3 tag, thought this should work, but it is acting like it does not exist.
Set Environment.Temp.Tagname = Fieldname(InputBody.REQUEST.APP.R3.*[1]);
set OutputRoot.XML.[1] NAME = Environment.Temp.Tagname;
Thanks.
Here is the input XML;
REQUEST
REQUEST.CONTROL
REQUEST.CONTROL.ORIGINATOR='O2O'
REQUEST.CONTROL.ORIGIN_DATETIME='Wed Mar 12 10:58:01 CDT 2008'
REQUEST.CONTROL.SERVICE='R3'
REQUEST.CONTROL.FUNCTION='Z_RFC_121_PARTNER_PLANT_LIST'
REQUEST.CONTROL.DESTINATION
REQUEST.CONTROL.DESTINATION.INSTANCE='DV3'
REQUEST.CONTROL.DESTINATION.CLIENT='120'
REQUEST.CONTROL.VERSION='1.0'
REQUEST.CONTROL.PERSISTENCE='N'
REQUEST.CONTROL.REALTIME='Y'
REQUEST.CONTROL.AUDIT_LOG='Y'
REQUEST.CONTROL.ROUTER_MSGTIMES
REQUEST.CONTROL.ROUTER_MSGTIMES.GMTMSGSTART='2008-03-12 15:58:01.165878'
REQUEST.CONTROL.ROUTER_MSGTIMES.GMTMSGCOMPLETION='2008-03-12 15:58:01.165878'
REQUEST.APP
REQUEST.APP.R3
REQUEST.APP.R3.ZSD_121_PLANT_IN
REQUEST.APP.R3.ZSD_121_PLANT_IN.item
REQUEST.APP.R3.ZSD_121_PLANT_IN.item.SALES_ORG='1900'
REQUEST.APP.R3.ZSD_121_PLANT_IN.item.DIST_CHL='40'
REQUEST.APP.R3.ZSD_121_PLANT_IN.item.DIVISION='10'
REQUEST.APP.R3.ZSD_121_PLANT_IN.item.SHIP_TO='1010005266'
REQUEST.STATUS
REQUEST.STATUS.CODE='0'
REQUEST.STATUS.DESCRIPTION='SUCCESSFUL' |
|
Back to top |
|
 |
chrisc |
Posted: Wed Mar 12, 2008 1:51 pm Post subject: |
|
|
Voyager
Joined: 19 Mar 2006 Posts: 77
|
From memory, InputBody (which is the equivalent of InputRoot.XML in your case) actually refers to the root element of your XML, not to some imaginary element above this.
So I think your statement should be:
Code: |
Set Environment.Temp.Tagname = Fieldname(InputBody.APP.R3.*[1]);
|
Last edited by chrisc on Wed Mar 12, 2008 2:03 pm; edited 1 time in total |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Mar 12, 2008 2:02 pm Post subject: Re: Fieldname question |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
schroederms wrote: |
I'm trying to get the tag name after the R3 tag, thought this should work, but it is acting like it does not exist.
Set Environment.Temp.Tagname = Fieldname(InputBody.REQUEST.APP.R3.*[1]);
set OutputRoot.XML.[1] NAME = Environment.Temp.Tagname;
|
You can "debug" it:
Set Environment.A1 = Fieldname(InputBody);
Set Environment.A2 = Fieldname(InputBody.REQUEST);
Set Environment.A3 = Fieldname(InputBody.REQUEST.APP);
Set Environment.A4 = Fieldname(InputBody.REQUEST.APP.R3);
Set Environment.A5 = Fieldname(InputBody.REQUEST.APP.R3.*[1]);
Which Ax fields are not null ? _________________ Marcin |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 12, 2008 2:27 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please don't use the XML domain for new message flows - it is deprecated. Please use XMLNSC. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|