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 » Unable to copy NULL value from DFDL to XML attribute

Post new topic  Reply to topic
 Unable to copy NULL value from DFDL to XML attribute « View previous topic :: View next topic » 
Author Message
ksrocks9
PostPosted: Fri Apr 08, 2016 9:17 am    Post subject: Unable to copy NULL value from DFDL to XML attribute Reply with quote

Apprentice

Joined: 11 Mar 2015
Posts: 35

Hi

I created message model with a copybook, Mainframe is sending NULL values in some fields. That null values are not coping XML attributes(NULL value in the tag) to output root.

Earlier I used message set for parsing. I am getting the output correctly.
SET OutputRoot.XMLNSC.Shop.(XMLNSC.Attribute)Code = InputBody.Shopcode;

Output is :
<Exempt Code="">ABC</Exempt>

I used the same copy book to create message model and getting same input message. I followed all the instructions in this document https://developer.ibm.com/integration/wp-content/uploads/sites/25/2015/02/IIB9000_MessageModeling_Lab2_COBOL.pdf


SET OutputRoot.XMLNSC.Shop.(XMLNSC.Attribute)Code = InputRoot.DFDL.Shop.Shopcode;

I am getting out put like
<Exempt>ABC</Exempt> (Missing XML attribute).

How to copy that Null value to output.


Thanks for your help in advance
Back to top
View user's profile Send private message
timber
PostPosted: Fri Apr 08, 2016 2:31 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

I have given some clear advice in your other ( almost duplicate ) thread. Have you done those things? If not, why not?
Back to top
View user's profile Send private message
ksrocks9
PostPosted: Mon Apr 11, 2016 8:30 am    Post subject: Reply with quote

Apprentice

Joined: 11 Mar 2015
Posts: 35

I was unable to explain properly last time (Sorry for that) that's why I posted again.
what you said was correct
"I think this is what is happening:
- The field reference InputRoot.DFDL.Shop.CODE does not exist in InputRoot, so it evaluates to NULL
- The attribute is not created in OutputRoot.XMLNSC because ESQL cannot create an attribute from a non-existent field.
"
It's unable to create the XML attribute for non- exist FIELD.

I am migrating flow from MB7 to IIB. In MB7 I used message set, with that, it's creating XML attribute. If I create message model with the same copybook I am getting this issue. How can I come out from this issue.

Thanks for you help
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Mon Apr 11, 2016 10:58 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

ksrocks9 wrote:
- The attribute is not created in OutputRoot.XMLNSC because ESQL cannot create an attribute from a non-existent field.

Not quite. Setting any field to NULL in ESQL removes it from your outgoing message.

COALESCE is your friend.
Back to top
View user's profile Send private message
ksrocks9
PostPosted: Wed Apr 13, 2016 8:08 am    Post subject: Reply with quote

Apprentice

Joined: 11 Mar 2015
Posts: 35

It was able to create the attribute with MRM parser. I used the same copybook and same input message.
Back to top
View user's profile Send private message
ksrocks9
PostPosted: Wed Apr 13, 2016 2:43 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Mar 2015
Posts: 35

Thanks Joe. COALESCE worked for me. Thanks for your help.
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 » Unable to copy NULL value from DFDL to XML attribute
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.