Author |
Message
|
chaitu |
Posted: Tue Aug 11, 2015 3:28 am Post subject: DFDL for unordered data |
|
|
Voyager
Joined: 15 Apr 2014 Posts: 89
|
Hello All,
I am trying to develope a DFDL for unordered data like
HDRGEO31 CTRL COBMIN
101000000068725095
201000000068725095000000067977231000000000000001
301000000068725095000000222693640000000000000001C
3010000000
301000000068725095000000222693640000000000000001C
401000000068725095000000161647068000000000000001
428000000068725095000000222693641000000000000002
30200000006872509500000003471005800000000000000
4010000000687250950000001616470710000000000
4280000000687250950000002226936420000000000000
428000000068725095000000222693642000000000000003
30200000006872509500000003471005800000000000000
4010000000687250950000001616470720000000
From my understanding i need to set the property SequenceKind = Unordered.
but for sequenceKind there is only ordered option.
could any one guide me to figure it out. I am usin IIB v9.
Thanks in Advance.  |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 11, 2015 4:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Who says this is un-ordered?
Code: |
group occurs n
3
4 (occurs 0 to n)
group |
_________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 11, 2015 5:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Why can't you use DFDL initiators to identify records and put them in a choice that repeats? |
|
Back to top |
|
 |
chaitu |
Posted: Wed Aug 12, 2015 3:22 am Post subject: |
|
|
Voyager
Joined: 15 Apr 2014 Posts: 89
|
Hello mqjeff,
401000000068725095000000161647068000000000000001
428000000068725095000000222693641000000000000002
30200000006872509500000003471005800000000000000
4010000000687250950000001616470710000000000
401 came again after 302 so i thought it is un-ordered.
I developed a DFDL with sequence groups and i am getting a parser error after 302
could any one advice me on this
From my understanding i am getting this error because 401 is came again and to figure it out i have set occurrence count kind to expression and have to set a value to occurs count, if so i am novice in setting occurs count.
Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 12, 2015 4:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
Why can't you use DFDL initiators to identify records and put them in a choice that repeats? |
Actually if your occurrences are truly random, this is the best advice.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 12, 2015 5:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you have a set of records that will appear in a known order, then create a sequence that has those records appear in that order.
If that set of records can repeat in the document, then put that sequence in a container that lets it repeat.
So if you have a message like
10x
11x
20x
30x
40x
40x
41x
30x
41x
Then you need to create a structure something like
Code: |
message
header 01 record
11 record
body 20 record
repeating 30 record
repeating, optional 40 record
repeating, optional 41 record |
You will then use the 01,02,etc as initiators to identify the records in the message, to allow the DFDL parser to know when one repeat has ended and the next has started. |
|
Back to top |
|
 |
chaitu |
Posted: Thu Aug 13, 2015 3:14 am Post subject: |
|
|
Voyager
Joined: 15 Apr 2014 Posts: 89
|
Hello All,
I am trying to generate a file like
xxxxx|yyyyyyy|MW000310N3
but i am getting like
xxxxx |yyyyyyy|MW000310N3
I set the size of first field 20 but, i dont want the space after xxxxx
from my understanding i should reset the size to 5.
could any one tell me is their any other way to figure it out with out resetting the size.
Thanks in advance. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 13, 2015 5:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So now you have an entirely different question.
About padding.
DFDL gives you many controls over how each individual field is rendered when it is serialized, including how and when and if whitespace is used to pad fields. |
|
Back to top |
|
 |
|