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 » Ignore blank space elements in DFDL parser

Post new topic  Reply to topic
 Ignore blank space elements in DFDL parser « View previous topic :: View next topic » 
Author Message
marquies
PostPosted: Fri Apr 22, 2016 6:14 am    Post subject: Ignore blank space elements in DFDL parser Reply with quote

Novice

Joined: 01 Feb 2012
Posts: 15

Hello Everyone.

Request your inputs on my following query:

Is it possible to ignore blank value elements in DFDL parsing that are optional in nature and having data type string i.e. The DFDL parsing for optional elements with blank space should be same as parsing the optional element that is not present in the input.

Kindly

Thank you
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 22, 2016 6:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes, it's possible.

Lots of discussion here about all kinds of situations with modelling data using DFDL.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
marquies
PostPosted: Fri Apr 22, 2016 6:38 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2012
Posts: 15

Thanks mqjeff.

Can you please help me on how to achieve it? i.e. how and what properties to be set..

Links or notes or any material briefing on the same will be helpful.

Thank you.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 22, 2016 6:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I can't tell you how to do it.

It depends entirely on the structure of your message.

As I said, there's lots of discussion here about modelling data with DFDL.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
marquies
PostPosted: Fri Apr 22, 2016 6:43 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2012
Posts: 15

Ok, no issues. I'll try to search for the same here.

Thanks.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Apr 22, 2016 3:48 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
The DFDL parsing for optional elements with blank space should be same as parsing the optional element that is not present in the input.
If the optional element occupies at least one byte in the input message ( even if that byte is a space character ) then according to the DFDL specification the element exists. That's a technical term, not just my opinion .

You can tell the DFDL parser to treat the all-spaces value as a nil value. That will produce an ESQL NULL value in the message tree when the input is filled with spaces.
Back to top
View user's profile Send private message
marquies
PostPosted: Mon Apr 25, 2016 1:13 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2012
Posts: 15

Thanks Timber.

Yes, I agree with you. But I want to tell the DFDL parser to delete the optional element, if it is a blank space, instead of treating it as NULL. Is it possible?
Back to top
View user's profile Send private message
timber
PostPosted: Mon Apr 25, 2016 1:47 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
I want to tell the DFDL parser to delete the optional element, if it is a blank space, instead of treating it as NULL. Is it possible?
No. Technically, your requirement is for conditional mapping ( deleting elements with a particular value ) not parsing. I understand that this feature would be useful for you, but
a) DFDL's scope has to stop somewhere and
b) it's not actually very hard to code around this problem.
Back to top
View user's profile Send private message
manoj5007
PostPosted: Tue Apr 26, 2016 8:37 am    Post subject: Reply with quote

Acolyte

Joined: 15 May 2013
Posts: 64

Marquies,

By default, DFDL doesn't construct optional values with null.
While parsing, the element will not be formed in the logical tree.
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 » Ignore blank space elements in DFDL parser
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.