|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
DFDL development : multiple version of a fixed length record |
« View previous topic :: View next topic » |
Author |
Message
|
mk140589 |
Posted: Wed Oct 09, 2013 10:33 am Post subject: |
|
|
Novice
Joined: 17 Jun 2013 Posts: 20
|
Quote: |
Are you trying to say that if you get FILES containing the same type of RECORDS then the parsing works?
and if you get FILES with different type of RECORDS then it does not ?
|
Both work, if you don't count the HREC-03 records, which has the versioning problem.
Quote: |
if you go to one shop and pay 10 p for a loaf of bread. The next day go to a different shop and again, pay 10 p for a loaf of bread. Will you then conclude that a loaf of bread will cost you 10 p anywhere in the world ?
|
No, off course not, but I don't get the sense of this question.[/quote] |
|
Back to top |
|
 |
dogorsy |
Posted: Wed Oct 09, 2013 10:39 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
Quote: |
Both work, if you don't count the HREC-03 records, which has the versioning problem.
|
NO, WRONG ANSWER. If BOTH were working, you would not be asking for help.
Quote: |
No, off course not, but I don't get the sense of this question |
The sense is that you are making assumptions that may not be correct.
Because the other one works is not a very scientific way of determining the separator. |
|
Back to top |
|
 |
mk140589 |
Posted: Wed Oct 09, 2013 10:45 am Post subject: |
|
|
Novice
Joined: 17 Jun 2013 Posts: 20
|
Quote: |
NO, WRONG ANSWER. If BOTH were working, you would not be asking for help.
|
I'm asking for help about the versioning, not about the separator.
But for some reason the xsd that I made for a test didn't work.
I hardly doubt that this has to do with a separator which was different then a %NL;
Why? Because I modified the testfile myself to resemble the longer version of HREC03 and before it was working fine.
I'm not making direct assumptions.
If I cut of the length to have only 1 version, the parsing is working well.
Please help me, instead of criticizing me. |
|
Back to top |
|
 |
dogorsy |
Posted: Wed Oct 09, 2013 10:53 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
mk140589 wrote: |
hardly doubt that this has to do with a separator which was different then a %NL;
|
Have you read the error message ? It is telling you that the parser could not find the separator '%NL;', so if you still have doubts, please raise a PMR.
mk140589 wrote: |
Please help me, instead of criticizing me. |
I have not criticized you. I have been trying to help, but you have not been answering the questions.
The answers should have been YES and NO. and not both but... |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 09, 2013 11:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So you say HREC03 is not working...
did you try and define it as a choice like Kimbert said?
HREC03a (with max length)
HREC03b (with all but 1 optional field last one...)
HREC03c (with all but 2 optional fields last 2....)
You get the drift!
I believe the failure to find the %NL is due to the fact that the parser thinks it's at the end of the record but instead of finding the record terminator it finds more data...
Have fun. _________________ MQ & Broker admin |
|
Back to top |
|
 |
dogorsy |
Posted: Wed Oct 09, 2013 11:44 pm Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
fjb_saper wrote: |
So you say HREC03 is not working...
did you try and define it as a choice like Kimbert said?
HREC03a (with max length)
HREC03b (with all but 1 optional field last one...)
HREC03c (with all but 2 optional fields last 2....)
You get the drift!
I believe the failure to find the %NL is due to the fact that the parser thinks it's at the end of the record but instead of finding the record terminator it finds more data...
Have fun. |
and the toolkit gives you a very nice trace that shows exactly what is being parsed, so the OP can follow it and work out why the separator is not being found, but I guess that is too much to ask for someone who does not know the difference between FILE and RECORD, or between OPTIONAL FIELD and FIELDS that are set to blank spaces.
And after I spent all day yesterday trying to help, he comes back saying: please help and do not criticize.  |
|
Back to top |
|
 |
kimbert |
Posted: Thu Oct 10, 2013 6:19 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi Maarten,
Sorry for not replying earlier - this is not a trivial problem, so I had to think about it. I hope the following advice is helpful.
I think you need to create a choice group that is structured like this:
Code: |
HREC01
field1 ( minOccurs=1)
choice
sequence : initiator=<50 spaces>
group ref="field3_sequenceGroup"
sequence : initiator=""
#minOccurs=1 is not a mistake here.
field2 minOccurs=1
group ref="field3_sequenceGroup"
group name=""field3_sequenceGroup"
choice
sequence : initiator=<50 spaces>
[no content for this sequence group]
sequence : initiator=""
#minOccurs=1 is not a mistake here.
field3 minOccurs=1
|
I have not tested this, so you will need to think about it, try it out, debug it, and possibly come back and tell me that it cannot work. Either way, please let us know how it goes. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
mk140589 |
Posted: Tue Oct 22, 2013 4:38 am Post subject: |
|
|
Novice
Joined: 17 Jun 2013 Posts: 20
|
Hi Guys,
Sorry that I'm only coming back this late, but I had some other problems to deal with.
I tried the choice, but it was always taking the first one, even when it encountered the terminator of the Record-element.
Since the recognition of these fields isn't the most important part of the whole flow, I decided to declare an optional field at the end of the record with lengthkind = "delimited".
In my mapping I handle the existance of the fields.
I would like to thank you for your help.
Best regards,
Maarten |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|