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 » Mixing order in DFDL fixed length segments

Post new topic  Reply to topic
 Mixing order in DFDL fixed length segments « View previous topic :: View next topic » 
Author Message
deecee
PostPosted: Wed Jun 15, 2016 9:40 am    Post subject: Mixing order in DFDL fixed length segments Reply with quote

Acolyte

Joined: 11 Sep 2014
Posts: 51

Hello, IIB v9.0
I have a scenario where the input is a fixed length file, in which each line is a different segment(BUYR, SELR in the below example) followed by data. For example.

--file begin--
BUYR 123US 560010<CR><LF>
SELR India456789456 1111<CR><LF>
--file end--

I have created a DFDL to handle this sample, I am trying to use the same DFDL for different applications with similar data.
But the problem is, the other applications have the order slightly misplaced i.e. they have SELR as first segment and BUYR after.

Is there anyway I can make the DFDL flexible so the order of these segments won't matter and it'll parse it correctly in any order?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 15, 2016 9:42 am    Post subject: Re: Mixing order in DFDL fixed length segments Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deecee wrote:
Is there anyway I can make the DFDL flexible so the order of these segments won't matter and it'll parse it correctly in any order?


Model it such that it's a choice for BUYR or SELR and parses appropriately
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deecee
PostPosted: Wed Jun 15, 2016 9:57 am    Post subject: Reply with quote

Acolyte

Joined: 11 Sep 2014
Posts: 51

But with choice, it's only expecting one of the two segments. I need both the segments to be present.
And this is just an example, in the real scenario I have around 10 segments all of which are optional and could come in different orders.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 15, 2016 10:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you need a repeating choice.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
deecee
PostPosted: Wed Jun 15, 2016 10:15 am    Post subject: Reply with quote

Acolyte

Joined: 11 Sep 2014
Posts: 51

yes, the repeating choice worked. Thank You!
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 » Mixing order in DFDL fixed length segments
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.