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 » DFDL to serialize optional delimiters - howto?

Post new topic  Reply to topic
 DFDL to serialize optional delimiters - howto? « View previous topic :: View next topic » 
Author Message
martc
PostPosted: Wed Jul 08, 2015 5:01 pm    Post subject: DFDL to serialize optional delimiters - howto? Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

I want to know how to make the DFDL parser to include the optional delimiters when serializing the output.

For example if my dfdl model contains 5 fields (optional) but my input only contains 1,3 &4 I want to write out the below when serializing the output.

FIELDS1||FIELD3|FIELD4||

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 08, 2015 6:51 pm    Post subject: Re: DFDL to serialize optional delimiters - howto? Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

martc wrote:
I want to know how to make the DFDL parser to include the optional delimiters when serializing the output.

For example if my dfdl model contains 5 fields (optional) but my input only contains 1,3 &4 I want to write out the below when serializing the output.

FIELDS1||FIELD3|FIELD4||

Thanks

Don't make the fields optional. Make them mandatory but nillable.
What your output shows is 5 fields with post delimiter '|' and null value for field 2 and field 5...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Jul 09, 2015 6:12 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need to set separatorSuppressionPolicy to 'trailingEmpty' or 'never'

See
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.dfdl.spec.doc/dfdl_index.htm
Section 14.2 to decide which one is appropriate for your data format.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
martc
PostPosted: Thu Jul 09, 2015 7:02 am    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Awesome, this (separatorSuppressionPolicy to 'trailingEmpty' or 'never') solved my problem!

Thanks guys as always
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 » DFDL to serialize optional delimiters - howto?
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.