|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
HELP: TDS message set |
« View previous topic :: View next topic » |
Author |
Message
|
Amith |
Posted: Wed May 18, 2005 3:57 am Post subject: HELP: TDS message set |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
Hi,
I am developing a TDS message set for the following type of data.
Header detail ( occurs once )
Record detail ( can contain either one of the 2 types of records, each type can occur 'n' number of times )
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc
type1, aaa,b,cc
type2,aa,bb,cc
type2,xx,zz,yy
type2,ww,ss,dd
i have created a compund type which inturn contains 2 compund type, one for header detail and another one for record detail.
TEST_MSG
|
|---HEADER DETAIL (occurs 1 time )
|---RECORD DETAIL (occurs n times, can be either type1 or type 2 )
I have set type composition and type content of RECORD DETAIL to "Choice" and "Closed" respectively.
The problem with my message set is its unable to parse the record.
Please help in this regard.
Thanks,
Amith |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 4:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What fails? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 4:20 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
My message set parses the data which contains only header
eg:-
H1, aabbcc,aabbc,aa,dd
But its unable to parse the following record
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc
type1, aaa,b,cc
type2,aa,bb,cc |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 4:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Post your error messages. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 4:46 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
When i try to parse the below data, the message set is considering only Header compund type to parse even typep1 or type 2 records. It is not able to differentiate header and record types.
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 5:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
How do you know?
Post your error messages _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 5:17 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
its not able to parse below data
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc
its giving some error related to last element of Header1 in this case element dd |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 5:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Amith wrote: |
its not able to parse below data
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc |
That's not an error message.
Amith wrote: |
its giving some error related to last element of Header1 in this case element dd |
POST THE ENTIRE CONTENTS OF THAT ERROR. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 5:47 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
The error is as follows:
Quote: |
TDS data conversion error.
Error converting characters at position 'n' to logical type 'Integer' in message 'TEST_MSG', current element 'abc' .
Please ensure that the element specified contains valid data for the logical type specified (Integer). |
'abc' is last element in Header Type.
Actually what my message is doing is, its comparing the second row with Header Type. But instead it should compare it with Record Type.
eg:-
H1, aabbcc,aabbc,aa,dd
type1, aaa, bbb,ccc |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 5:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay.
If it can't parse the first header record completely, it won't parse anything else.
Secondly - what mechanism have you used to resolve the choice you have created? Are you using Tags or Data Patterns to let the parser do it? Or are you leaving it up to your CODE to do so? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 6:24 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
All elements are delimited by comma, Type1 record has 10 elements and Type2 record has 5 elements. As the message set finds 10 elements it should select the Type1 else Type2 record. But this is not happening. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 6:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No, I don't think that is sufficient to distinguish your types - not to the parser at least.
If your records really start with "H1", "Type1", or similar, then why not just use them as Tags - that will resolve your problem. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Wed May 18, 2005 7:09 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
Type1 and Type 2 records are starting with 2 and 3 respectively.
eg:-
1, aabbcc,aabbc,aa,dd -- header record
2, aaa, bbb,ccc -- Type1 record
3,aa,xx,yy -- Type2 record
how can i create tag delimited message set? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 7:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You change the type composition (I think?) to Tagged Delimited on your Choice element.
You change the type composition on your main message to Variable Length Elements delimited.
Set your tags on the record groups. Remove the element that currently holds your tag value from each record group.
You search here for Tagged,Delimited and see the other solutions offered to get more information - and to double check my faulty memory. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Thu May 19, 2005 2:29 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Nearly right, Jeff! It is 'Data Element Separation' that needs to be set to 'Tagged Delimited'. It is on the TDS properties. |
|
Back to top |
|
 |
|
|
 |
Goto page 1, 2 Next |
Page 1 of 2 |
|
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
|
|
|
|