|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Can we handle fields variation count using DFDL ??? |
« View previous topic :: View next topic » |
Author |
Message
|
Poli091987 |
Posted: Mon Mar 21, 2016 11:41 pm Post subject: Can we handle fields variation count using DFDL ??? |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
Hi,
I have a requirement where one of the header fields may have 36 (or) 37 fields but my DFDL will parse when it has 37 fields, but it will fail when we try to Parse 36 Fields from DFDL .
Is there any alternative method to achieve this functionality ???
Example :
36 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619,
37 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619, |
|
Back to top |
|
 |
timber |
Posted: Tue Mar 22, 2016 12:37 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Those two lines look identical to me. Please point out exactly where they differ, and tell us what the rules are for detecting whether the extra field is present. |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:16 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
The count will be 36 for one and for other 37 for the examples i have posted.
The Last field may come (or) not but our DFDL should process both. |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:20 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
The count will be 36 for one and for other 37 for the examples i have posted.
The Last field may come (or) not but our DFDL should process both. |
You still have not answered Timber's question. The two examples you gave seem to be exactly the same.
The answer to your question is yes, you can do that. But if you want to know how , you will have to learn to answer the questions you are being asked. |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:23 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
As i said The Last Field may come (or) not and please find the difference below :
36 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619,
37 Fields
37 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619 |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:24 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
i have highlighted in Bold the actual difference between two files. |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:28 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
As i said The Last Field may come (or) not and please find the difference below :
36 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619,
37 Fields
37 Fields
PI.HEADER:2000197067,20150619,3,NAZ,DNY,,20150619,,2000197067,218.85,000000000.00,218.85,000000000.00,000000000.00,000000000.00,0.00,,000000000.00,0.00,000000000.00,218.85,,,,000000000.00,,,,000000000.00,,.00,0.00,12.39,000000000.00,218.85,20150619 |
Yes, we know what you said.
what you have posted now is DIFFERENT to what you had before. You could easily have said the first example has a comma, meaning there is a field to follow ( and that would 37 fields not 36 ), the second does not have a comma ( making it 36 fields not 37 ).
By the way, if the last field may or maynot be present, what does that tell you ? |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:32 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
some files may come with 36 or 37 , we have defined the DFDL to handle 37.
But in some scenarios the source system is sending 36 fields at the point it is failing with parsing error. |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:33 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
some files may come with 36 or 37 , we have defined the DFDL to handle 37.
But in some scenarios the source system is sending 36 fields at the point it is failing with parsing error. |
Please don't keep repeating what you have already said.
Think carefully and answer the question you are being asked.
If a field may or maynot be present, what does that mean ? |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:36 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
i did not get your question what does that mean ???
The message should be processed if the count is 36 or 37 and also just to confirm we are not sure which field will be coming and which will be missing.
That is the worst part of it. |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:39 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
i did not get your question what does that mean ???
|
Do you know what MANDATORY means ?
Do you know what OPTIONAL means ? |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:42 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
Last Field is Mandatory , just for the confirmation we are not sure which field may not come .
That has become biggest problem now and we have asked user to confirm the actual field and he also does not have the information. |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:45 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
Last Field is Mandatory , just for the confirmation we are not sure which field may not come .
That has become biggest problem now and we have asked user to confirm the actual field and he also does not have the information. |
No, that is not what you have shown us in your examples. In one of them the last field is missing ( the one without a comma at the end ). And please DO NOT KEEP REPEATING the same over and over. |
|
Back to top |
|
 |
Poli091987 |
Posted: Tue Mar 22, 2016 1:49 am Post subject: |
|
|
Novice
Joined: 10 Dec 2012 Posts: 16
|
i have showed the example but just got the confirmation from the Team that we are not sure which field does not come up.
Sorry for repeating my question again and again  |
|
Back to top |
|
 |
maurito |
Posted: Tue Mar 22, 2016 1:53 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Poli091987 wrote: |
i have showed the example but just got the confirmation from the Team that we are not sure which field does not come up.
Sorry for repeating my question again and again  |
Can you explain clearly what you mean by "a field does not come up"?
Then answer the following:
You have a DFDL model for a CSV record ( please, YES or NO ).
The model has 37 fields ( YES or NO ).
ALL fields in the model have minOccurs = 1, maxOccurs =1 ( YES or NO ) |
|
Back to top |
|
 |
|
|
 |
Goto page 1, 2, 3 Next |
Page 1 of 3 |
|
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
|
|
|
|