Author |
Message
|
mqbrks |
Posted: Thu Mar 30, 2017 7:05 am Post subject: Discriminators for two fields |
|
|
Acolyte
Joined: 17 Jan 2012 Posts: 62
|
Hi All,
I have trouble parsing my file with DFDL using discriminators. Here are the details.
I have a file with
1 Header Record
MultipleDataRecords
Data_1
Data1a
Data1b
Data1c
Data_2
Data2a
Data2b
Data2c
Data_3
Data3a
Data3h
Data3k
Each of the individual data records (like data1a,data1b....) have fields based on which I want to discriminate the data.
At the sequence of each data records (data1a,Data1b....) I have a discriminator like {./DataType eq '2' and ./DataCode2A eq 'A'}
But these doesn't parse the data correctly, I am getting a parsing exception saying "fatal: CTDP3002E: Unexpected data found at offset '546' after parsing completed. Data: '0x52...'."
Any ideas if I am doing a wrong way of writing the discriminator expressions ? Does IIB DFDL model solve two test conditions in a record.
Your inputs please!
Appreciate your help! |
|
Back to top |
|
 |
timber |
Posted: Thu Mar 30, 2017 3:03 pm Post subject: |
|
|
 Shaman
Joined: 25 Aug 2015 Posts: 743
|
Post an example of your input data.
Post the message tree structure that you want to get after parsing it
Then, explain *very* carefully what you want the DFDL parser to do when it encounters each record.
Use [c o d e] tags when posting any code or data. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 31, 2017 4:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Do you expect each record to appear in exactly the sequence you have listed?
Or will you have a choice of records, that repeats? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mqbrks |
Posted: Fri Mar 31, 2017 6:37 am Post subject: |
|
|
Acolyte
Joined: 17 Jan 2012 Posts: 62
|
Thank you kimbert and mqjeff!!
There was issue in one of the record( a field was missing) so that was causing the whole issue of total record length. When I corrected it the discriminators and parsing worked fine. Now I am able to parse the records and discriminate them perfectly. |
|
Back to top |
|
 |
|