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 » General IBM MQ Support » I must have misunderstood something about ESQL references

Post new topic  Reply to topic
 I must have misunderstood something about ESQL references « View previous topic :: View next topic » 
Author Message
matoh
PostPosted: Fri Apr 15, 2005 6:57 am    Post subject: I must have misunderstood something about ESQL references Reply with quote

Apprentice

Joined: 04 Mar 2005
Posts: 26

I'm trying to do some remapping in a compute node (because of some interdependant conditions that makes the mapping tool inconvenient).

After declaring a refrerence to a subtree, I don't seem to be able to refer to subnodes to that reference by name, but only by number. Why is that?

For example, this piece of code:

Code:

      DECLARE s_costObject REFERENCE TO s_costObjectListDocument.sipcol:costObjectList.sipcol:costObject[I];
      DECLARE t_costObject REFERENCE TO t_CostObjectInformation2.extco:CostObjectInformationDetail.extco:ListOfCostObjects.extco:CostObject[I];

      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER)} = s_costObject;
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'B'} = s_costObject.costCenter;
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BA'} = FIELDNAME(s_costObject);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BB'} = FIELDNAME(s_costObject.[1]);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BBB'} = FIELDNAME(s_costObject.[1].[1]);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'C'} = s_costObject.costCenter.costCenterID;


Gives this output:

Code:

(0x01000013):debug1                                                                                                                             = (
      (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenter       = (
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterID               = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:name                       = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:organisationCostCenterName = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:profitCenter               = '...'
        (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:responsible                = (
          (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:userID = '...'
        )
      )
      (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:parentCostObject = (
        (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterRef = (
          (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterId = ''
        )
      )
    )
    (0x03000000):debug1BA                                                                                                                           = 'costObject'
    (0x03000000):debug1BB                                                                                                                           = 'costCenter'
    (0x03000000):debug1BBB                                                                                                                          = 'costCenterID'
(Data from the XML message in the test run replaced with ellipses)

Note that Debug1B and Debug1C is absent.

Why is it that "s_costObject.costCenter" is NULL while "FIELDNAME(s_costObject.[1])" is "costCenter"?
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Apr 15, 2005 7:03 am    Post subject: Re: I must have misunderstood something about ESQL reference Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

matoh wrote:
Why is it that "s_costObject.costCenter" is NULL while "FIELDNAME(s_costObject.[1])" is "costCenter"?


Maybe you need to refer to s_costObject.<schema>:costCenter.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
matoh
PostPosted: Fri Apr 15, 2005 7:20 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2005
Posts: 26

No difference:

Code:

      
      DECLARE s_costObject REFERENCE TO s_costObjectListDocument.sipcol:costObjectList.sipcol:costObject[I];
      DECLARE t_costObject REFERENCE TO t_CostObjectInformation2.extco:CostObjectInformationDetail.extco:ListOfCostObjects.extco:CostObject[I];

      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER)} = s_costObject;
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'B'} = s_costObject.costCenter;
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BQ'} = s_costObject."costCenter";
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BN'} = s_costObject.sipcol:costCenter;
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BQN'} = s_costObject."sipcol:costCenter";
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BA'} = FIELDNAME(s_costObject);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BB'} = FIELDNAME(s_costObject.[1]);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'BBB'} = FIELDNAME(s_costObject.[1].[1]);
      SET t_CostObjectInformation2.{'debug' || CAST(I AS CHARACTER) || 'C'} = s_costObject.costCenter.costCenterID;


gives:

Code:

    (0x01000013):debug1                                                                                                                             = (
      (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenter       = (
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterID               = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:name                       = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:organisationCostCenterName = '...'
        (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:profitCenter               = '...'
        (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:responsible                = (
          (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:userID = '...'
        )
      )
      (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:parentCostObject = (
        (0x01000013)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterRef = (
          (0x0300000B)http://open.air.saab.se/xmlschema/msg/sip_costobject.xsd:costCenterId = ''
        )
      )
    )
    (0x03000000):debug1BA                                                                                                                           = 'costObject'
    (0x03000000):debug1BB                                                                                                                           = 'costCenter'
    (0x03000000):debug1BBB                                                                                                                          = 'costCenterID'



Neither debug1BN nor debug1BQN appears...
Back to top
View user's profile Send private message Send e-mail
matoh
PostPosted: Fri Apr 15, 2005 7:42 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2005
Posts: 26

Many thanks for the suggestion to look closer at the namespaces!

Looks like I was using the wrong namespace declaration...
(Due to a schema inclusion, the namespace changes in mid-tree)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » I must have misunderstood something about ESQL references
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.