Author |
Message
|
dipankar |
Posted: Mon May 30, 2005 9:18 pm Post subject: TDS Message Set Design |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Here is my sample input data
iDocHeader
iDoc Line 1
iDoc Line 2
iDoc Line 3
iDocHeader
iDoc Line 1
iDoc Line 2
iDocHeader
iDoc Line 1
iDoc Line 2
iDoc Line 3
iDoc Line 4
IDocHeader and IDoc Line both are fixed length and their lengths are different.
So I have used Fixed length as Data Element Separation in TDS wire format. Note that here under each iDocHeader, number of occurrence of iDoc Line is varied.
So if I used
Code: |
Msg
Batch(*)
iDocHeader(1)
iDoc Line(0 …*) |
it is not working properly.
If I give the following input
iDocHeader
iDoc Line 1
iDoc Line 2
iDoc Line 3
then it is working fine. But if I give the follwing input
iDocHeader
iDoc Line 1
iDoc Line 2
iDoc Line 3
iDocHeader
then it creates exception.
Here I think last iDocHeader is treated as iDoc Line.So due to length mismatch, it creates exception.
How can I solve it? What will be perfact design of message set?
Note there is no way to use Tag Delimiter.
Any hints or help appreciated! |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 31, 2005 12:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So you have a fixed-length header, followed by an unknown number of fixed-length data records. This pattern repeats an unknown number of times.
There must be something in the message which either identifies the record type (as 'header' or 'line') or which says how many iDoc lines there are under each header. Otherwise the message would be unparseable. |
|
Back to top |
|
 |
dipankar |
Posted: Tue May 31, 2005 1:19 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Kimbert,
Here is my actual input
EDI_DC40 100000000000023842346C 3014 ZPOST01
Z2EDPSPT000 100000000000023842300000200000002DE010HRP1 05112005DE010
Z2EDPSPT000 100000000000023842300000200000002DE010HRP1 05112005DE010
Z2EDPSPT000 100000000000023842300000200000002DE010HRP1 05112005DE010
Z2EDPSPT000 100000000000023842300000200000002DE010SPLIT 05112005DE010
EDI_DC40 100000000000023842446C 3014 ZPOST01
Z2EDPSPT000 100000000000023842400000200000002DE010HRP1 05112005DE010
Z2EDPSPT000 100000000000023842400000200000002DE010HRP1 05112005DE010
Z2EDPSPT000 100000000000023842400000200000002DE010SPLIT 05112005DE010
EDI_DC40 100000000000023842546C 3014 ZPOST01
Z2EDPSPT000 100000000000023842500000200000002DE010HRP1 05112005DE010
............
Here the sequence of input is Header, line1, line2, line3, line4, Header, line1 ....
Is it parseable? |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 31, 2005 1:39 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi dipankar,
That's useful, but I still need more info:
Do all your header lines start with 'EDI_DC'?
Do all your data lines start with 'Z2ED'?
Does the last data record always contain the value 'SPLIT'?
I have some ideas, but there's no point in explaining them until I understand properly how the message is structured. |
|
Back to top |
|
 |
dipankar |
Posted: Tue May 31, 2005 2:03 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Kimbert,
All the Header lines start with EDI_DC,
all the lines start with Z2ED and the last data line contains SPLIT except for the last Header i.e. the last line of input message does not contain SPLIT.
Does it make sense Kimbert?
Note I do not want to use Tag Delimeter. Are there any other options to parse? |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 31, 2005 3:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Note I do not want to use Tag Delimeter |
I'm very puzzled. You have a tagged delimited message, and you do not want to use a tagged delimited parsing style. Please explain! |
|
Back to top |
|
 |
dipankar |
Posted: Tue May 31, 2005 4:07 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Kimbert,
you are absolutely correct. I know this is tagged delimited message. But I am not very sure of the structure of the input message as I have a small portion of input message which I have mentioned before.
So I want to make the message parseable independent of tag.
That's why, I asked for another solution. Anyway thanks a lot. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 31, 2005 6:40 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am not very sure of the structure of the input message |
That's a very bad start when you're trying to model it. I strongly advise you to speak to the department/organisation which issues the message and clarify exactly what the structure is.
If you cannot do that, you will have to write some ESQL which deals with the message one line at a time, and re-parse each line using CREATE FIELD...PARSE. That way, at least you could spot the 'SPLIT' field on a data record and parse the next line as a header. There are plenty of examples of this elsewhere on this forum. |
|
Back to top |
|
 |
dipankar |
Posted: Tue May 31, 2005 6:39 pm Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Kimbert,
I got your point. I will follow your advise. Thanks a lot for your great help. |
|
Back to top |
|
 |
dipankar |
Posted: Mon Jun 13, 2005 12:14 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Kimbert,
I have used Tag Delimited Message set. Everything is fine. But I have found some issues which I could not resolve. The maximum number of repetition of iDoc Line is 100. That's why in the connection tab of compound element, I have mentioned Min Occurs 1, Max occurs 100. However if I give an input with more then 100 iDoc Lines, it does not create exception. It has been parsed.
Can you please tell me what basic things I am missing? |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 13, 2005 12:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
dipankar |
Posted: Mon Jun 13, 2005 3:44 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi,
I am still unable to create exception. I am using WMQI Broker V 2.1 and CSD 2.1. There is no validation tab in compute node. That's why, I switched on validation in input node. I simply execute the following message flow
input node - trace node - compute node - output node.
It might something wrong in my message set. iDoc line is a compound element.
Can you please give me the overview of the design of the message set? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 13, 2005 4:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
CSD3 and later of 2.1 introduces validation at the compute node level.
Also, the validation in CSD3 and later is vastly improved - it is actually validation, not just some simple kinds of checks.
So upgrade to the latest CSD of 2.1, and try again. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dipankar |
Posted: Mon Jun 13, 2005 4:06 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Sorry it was all by my mistake. The CSD I am using is 8, not 2.1 |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 13, 2005 4:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So you're using v2.1 CSD8?
Have you set the 'Type Content' property to 'Closed' on all your compound types? |
|
Back to top |
|
 |
|