|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Mixing order in DFDL fixed length segments |
« View previous topic :: View next topic » |
Author |
Message
|
deecee |
Posted: Wed Jun 15, 2016 9:40 am Post subject: Mixing order in DFDL fixed length segments |
|
|
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 |
|
 |
Vitor |
Posted: Wed Jun 15, 2016 9:42 am Post subject: Re: Mixing order in DFDL fixed length segments |
|
|
 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 |
|
 |
deecee |
Posted: Wed Jun 15, 2016 9:57 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Wed Jun 15, 2016 10:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So you need a repeating choice. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
deecee |
Posted: Wed Jun 15, 2016 10:15 am Post subject: |
|
|
Acolyte
Joined: 11 Sep 2014 Posts: 51
|
yes, the repeating choice worked. Thank You! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|