Author |
Message
|
Prithvi |
Posted: Tue Jul 12, 2005 2:29 am Post subject: Message set problem(TDS) |
|
|
 Apprentice
Joined: 20 Dec 2004 Posts: 34
|
Hi,
I have to cretae a message set whiwh parses the following data:
0001BBL|0293311|068924|18153|/BG59 |N|NY|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001LVP|0293311|BRUG|GENT0|0115 |1 |8000|BRUGGE|
0001LVP|0293311|BRUG|GENT0|0115 |1 |8000|BRUGGE|
.
.
.
I have created a message set with TDS wire format, created a seperate complex type for each of the individual structure(i.e BBL,BDP,LVP....).
Each of them has the following properties:
All Elements Delimited
Group Indicator: '0001BBL|' for the first one and so on for each of them
Group Terminator: '|'
Delimiter: '|'
My broker doesnt seem to be picking up these properties. Could somebody help me with this?
I am on WBI MBV5 with CSD 4
Thanks in advance,
Prithvi |
|
Back to top |
|
 |
Pam |
Posted: Tue Jul 12, 2005 4:02 am Post subject: |
|
|
Novice
Joined: 10 Dec 2004 Posts: 11
|
Hi Prithvi,
Henge iddiya
I assume there is a <CR> and <LF> at the end of each line in your message.I guess you are facing this problem because the Group Terminator and Delimiter both are same i.e |
Solution 1:- Instead of using Group Indicator and Group Terminators, try using Data pattern for each compound type.Also set <CR><LF> as the Delimiter for your parent compound type.
For example,
0001BBL{^|}| --> for the first line in your message.
Similarly you can do that for other compound types.
Solution 2:- You can have a subflow which reads each line and propagates to your main flow with MessageType set to particular value in the header.
Solution 3:- You can also try using Group Terminator as '|\n' with your existing configuration.
Cheers, _________________ Pam
IBM Cert. MQ Series System Administrator
IBM Cert. WBI MB System Administrator |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 12, 2005 4:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Actually, I would just use a Tag instead of the Group Indicator.
Remove the |, and set for example '0001BBL' to be the Tag for one record group and '0001BDP' for another.
Then set the delimiter to |, and the group terminator to "|<CR><LF>".
And post errors as they occur, so we can help troubleshoot. "My broker doesnt seem to be picking up these properties. " is not descriptive. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Mensch |
Posted: Sun Jul 17, 2005 2:09 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2005 Posts: 166
|
I agree with Pam _________________ Thanks and Regards ,
Mensch |
|
Back to top |
|
 |
Maverik |
Posted: Sun Jul 17, 2005 11:20 pm Post subject: |
|
|
Apprentice
Joined: 14 Jun 2005 Posts: 27
|
Hey Prithvi,
R the number of fields in BBL,BDP etc constant ??
Ur creation of complex types of BBL,BDP...is fine....just set the delimiter as '|'...no group indicators or terminators required.....
this would mean that for ur first line "0001BBL|0293311|068924|18153|/BG59 |N|NY|" you should have 7 fields defined in the complex type say BBL....BDP has 6 etc etc....
Now define a main complex type say HEADER and put ur sub complex types BBL,BDP etc under it........Now for HEADER set delimiter as '|<CR><LF>'.......No group indicators or terminators required....
Hope it works...let us know...... |
|
Back to top |
|
 |
kimbert |
Posted: Sun Jul 17, 2005 11:59 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I agree with Maverik - if you can get away without using Data Patterns, you will use a lot less CPU. |
|
Back to top |
|
 |
Prithvi |
Posted: Wed Jul 20, 2005 12:19 am Post subject: |
|
|
 Apprentice
Joined: 20 Dec 2004 Posts: 34
|
Hi,
Thanks for you replies guys....
I am trying to implement the following solution.
For the top level complex type:"All elements delimited" with "|<CR><LF>" as the delimiter.
For the lower level complext types: "Tagged delimited" with "0000000001BBL" and so on as the tag
and
"|" as the delimiter
But the broker is not picking up the delimiter for the complex types !!
I am getting the following error:
ParserException BIP5441E: The TDS Parser has encountered a Tag value of length 0 within the bitstream.
The TDS parser is expecting a Tag value delimited by the Tag Data Separator (0000000001BBL|) at position 0 in the bitstream. The Tag value is not present (length 0).
The message model definition does not match the bitstream. Check that your model definition is correct and if so, update your bitstream data accordingly.
i have tried giving the hexadecimal equivalent of the delimiter but the broker still doesn't pick it up.
Any ideas ??? _________________ Prithvi |
|
Back to top |
|
 |
fschofer |
Posted: Wed Jul 20, 2005 1:51 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
Quote: |
ParserException BIP5441E: The TDS Parser has encountered a Tag value of length 0 within the bitstream.
The TDS parser is expecting a Tag value delimited by the Tag Data Separator (0000000001BBL|) at position 0 in the bitstream. The Tag value is not present (length 0).
The message model definition does not match the bitstream. Check that your model definition is correct and if so, update your bitstream data accordingly. |
Use Tag Data Separator | not 0000000001BBL|.
Instead of Tag Data Separator you can use Length of Tag.
For more information look here
http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ad00814_.htm
Greetings
Frank |
|
Back to top |
|
 |
Prithvi |
Posted: Wed Jul 20, 2005 2:15 am Post subject: |
|
|
 Apprentice
Joined: 20 Dec 2004 Posts: 34
|
Frank,
My data is in the format :
00001BBL|A|ZZ|F|
00001BFG|E|D|ER|22R|
When i keep the tag data seperator as "|", the broker assumes the values preceding the '|' to be tags !!
For example: when i run a trace on the flow....
I should get
(0x01000021):MRM = (
(0x01000013):BBL = (
(0x01000013):BBL = (
(0x0300000D):Field1 = 'A'
(0x0300000D):Field2 = 'ZZ'
(0x0300000D):Field3 = 'F'
)
(0x01000013):BFG = (
(0x01000013):BFG = (
(0x0300000D):Field1 = 'E'
(0x0300000D):Field2 = 'D'
(0x0300000D):Field3 = 'ER'
(0x0300000D):Field4 = '22R'
)
)
But instead what i am getting is:
(0x01000021):MRM = (
(0x01000013):BBL = (
(0x01000013):BBL = (
(0x0300000D):A = 'ZZ'
(0x0300000D):F = ''
)
(0x01000013):BFG = (
(0x01000013):BFG = (
(0x0300000D):E = 'D'
(0x0300000D):ER = '22R'
)
)
The problem here is that only the element at the higher level have tags, not the individual lower level elements. But the broker assumes that the values preceding the |(tag data seperator) is the tag. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 20, 2005 2:18 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Check the error message - it is actually quite clear. You have set the Tag Data Separator instead of the Tag. The parser is looking for a tag which is terminated by the string 0001BBL|. What you want is a fixed-length tag 0001BBL|.
Solution:
Go to the Complex Type properties
Find the section 'Distinguish tag and data values using:'
Clear the 'Tag Data Separator' field
Set the Length of Tag to 8
Check that the Tag property has been set on all your complex elements.
(I assume that you are using complex elements, not groups, for the lower-level structures)
Refresh the BAR file
Redeploy the BAR file |
|
Back to top |
|
 |
Prithvi |
Posted: Wed Jul 20, 2005 2:50 am Post subject: |
|
|
 Apprentice
Joined: 20 Dec 2004 Posts: 34
|
If i set the tag length of the complex typr as 8, then the broker expects all the elements under that complex type to also have a tag of length 8. But i do not have any tags for the child level elements, only a delimiter. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 20, 2005 3:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You don't need tags for the child level elements. You do need tags for the top-level elements. In other words, you are applying the settings at the wrong level in your message model. |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Jul 20, 2005 3:31 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Prithvi,
Ur simple messing up a very simple message set.Why do u need tag data seperators.
Do u have any idea what a tag data seperator is ???
If u have say an XML , <Name><First>Elvis</First><Middle>At</Middle><Last>MQSeries</Last></Name>
then ur TDS message if us using ':' as tag data seperator and '{' and '}' as group indicator and terminator is
Name{First:Elvis|Middle:At|Last:MQSeries}
Is this what you want ?? I dont think the input you have provided has Tags along with values.....
If i'm right...you cannot use tag data seperators....make use of "All elements delimited" |
|
Back to top |
|
 |
BrisVegas |
Posted: Mon Jul 25, 2005 8:18 pm Post subject: Re: Message set problem(TDS) |
|
|
Novice
Joined: 05 Aug 2004 Posts: 14 Location: Brisbane, Australia
|
Prithvi wrote: |
Hi,
I have to cretae a message set whiwh parses the following data:
0001BBL|0293311|068924|18153|/BG59 |N|NY|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001BDP|D|NY|NR|Brief werk niet ontvankelijk |P|
0001LVP|0293311|BRUG|GENT0|0115 |1 |8000|BRUGGE|
0001LVP|0293311|BRUG|GENT0|0115 |1 |8000|BRUGGE|
.
.
.
I have created a message set with TDS wire format, created a seperate complex type for each of the individual structure(i.e BBL,BDP,LVP....).
Each of them has the following properties:
All Elements Delimited
Group Indicator: '0001BBL|' for the first one and so on for each of them
Group Terminator: '|'
Delimiter: '|'
|
Don't know about v5, but I use this kind of structure on 2.1 all the time.
You can treat each of your different compound types as elements in a super type. Just set each element up with a tag ("0001BBL", "0001BDP" etc. so the parser knows what strucutre to use) and then add to a super/top level type.
The top level type would be tagged-delimited. Set the tag-data separator as "|" and your delimeter as "|<CR><LF>". |
|
Back to top |
|
 |
|