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 » Else statement for NUll select statement

Post new topic  Reply to topic Goto page Previous  1, 2
 Else statement for NUll select statement « View previous topic :: View next topic » 
Author Message
ydeonia
PostPosted: Tue May 14, 2013 5:48 am    Post subject: Reply with quote

Acolyte

Joined: 29 Oct 2012
Posts: 74

Hi All,

I have fixed the issue with select statement and its working perfectly I havent used the LASTMOVE or Reference method to read XML elements and attributes
Code:

SET OutputRoot.XMLNSC.root.row[rowCnt] = THE (SELECT THE(SELECT S.*:Property.*:NameValue AS TyrePatternCd FROM T.*:Specification[] AS S
         WHERE S.Property.NameValue.(XMLNSC.Attribute)Name='PATTERN' AND S.(XMLNSC.Attribute)Type = 'PHYSICAL') AS product_Info
         FROM itemMaster.*:ItemMasterHeader[] AS T );

I changed to

Code:
SET OutputRoot.XMLNSC.root.row[rowCnt].product_Info .TyrePatternCd  = THE (SELECT ITEM THE(SELECT ITEM S.*:Property.*:NameValue FROM T.*:Specification[] AS S
         WHERE S.Property.NameValue.(XMLNSC.Attribute)Name='PATTERN' AND S.(XMLNSC.Attribute)Type = 'PHYSICAL')
         FROM itemMaster.*:ItemMasterHeader[] AS T );


the above change solved my value NULL problem. Now even if the value is null the tree will be same like before with tag as NULL.

I added one more line after that

Code:
SET OutputRoot.XMLNSC.root.row[rowCnt].product_Info .TyrePatternCd.(XMLNSC.Attribute)= NULL


The above code is making the Attribute as NULL since it was fetching the Attribute name also with select query in output XML structure like below

Code:
<root>
<product_Info>
<TyrePatternCd Name ='PATTERN' >value</TyrePatternCd >
</product_Info>
</root>

now comes like


Code:
<root>
<product_Info>
<TyrePatternCd >value</TyrePatternCd >
</product_Info>
</root>

Even if value is null it keeps the output XML tree structure as it is.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Else statement for NUll select statement
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.