|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help TDS msg set |
« View previous topic :: View next topic » |
Author |
Message
|
Bravo |
Posted: Fri May 09, 2008 9:31 am Post subject: Help TDS msg set |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi All,
I'm using WBIMB Ver 5 csd 5 and trying to create TDS msg set for the following input data,
Code: |
HH|010|FL|TEST000000000057|2008-05-07-10.55.45.809330<CR>
DD|1|DT|FL|M06-00000-019||2008-05-07|321|2008-05-07<CR>
DD|2|DT|FL|M06-00000-020||2008-05-07|321|2008-05-07<CR>
TT|51|TEST000000000057
|
I have created three groups with no group indicatior, no group terminator but delimiter is |
Header
Detail
Trailer
I have created complex types with no group indicatior, no group terminator but delimiter is |
TDS_type
Header1
Detail1
Trailer1
Code: |
Data element TDS_msg with TDS_type
|
|__\ Data element "Header" with "Header1" as type
/ data element separation of the outer sequence is "Use Data Pattern"
data pattern of (([^\r]|(\r)+\r)+ on the inner sequence.
data element "Detail" and RDE <CR> with "Detail1" as type
data pattern of ([^\r]|(\r))+ on the "Trailer" element with "Trailer1" as type.
group terminator of <CR> on the inner sequence.
|
I am having problem only with Trailer record and I'm getting TDS general error.
Any suggestion. _________________ Bravo |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 12:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your model should look something like this:
Code: |
Element Name='Message'
Local Complex Type DES=Tagged Delimited, Tag Data Separator=|, Delimiter=<CR>
Element Name='Header', Tag='HH'
Local complex type DES=All Elements Delimited, Delimiter=|
headerField1
headerField2
Element Name='Line' Tag='DD'
Local complex type DES=All Elements Delimited, Delimiter=|
lineField1
lineField2
Element Name='Trailer' Tag='TT'
Local complex type DES=All Elements Delimited, Delimiter=|
trailerField1
trailerField2
|
Give it a try, try to fix the problems, and post ( in full ) any errors which you get. |
|
Back to top |
|
 |
Bravo |
Posted: Mon May 12, 2008 11:05 am Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Kimbert thanks for the inputs.
I have restructured TDS msg set as per your suggestion. There are no errors in message tree while debugging. But the first field for each record is missing in message tree.
For headerfield1, I'm expecting 'HH' but getting '010'.
For trailerField1, I'm expecting 'TT' but getting '51'.
All lineField1's, I'm not getting 'DD'.
The data I used as a Tag and also first field of the input message not showing while debugging.
Can you please share some inputs how to get all the tags as my first fileds. _________________ Bravo |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 11:32 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the first field for each record is missing in message tree. |
It's not a field - it's a tag! You need to understand the difference between data and markup. Data is the actual information in your message. Markup consists of tags, delimiters, group indicators etc. Markup is there mainly to help the parser, and you do not need to manipulate it in your message flow.
All you need to do is delete headerfield1, trailerfield1 etc from your message definitions. The name of the parent element ('header', 'trailer' etc ) will tell you what type of record you are dealing with. |
|
Back to top |
|
 |
Bravo |
Posted: Mon May 12, 2008 12:28 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Thanks kimbert..
After removing first field from each complex type, the message tree parsed perfectly ignoring first field.
Based on my layout provided, Tags(HH,DD and TT) are the first field of the input message.
Is there any way to get the Tags in message tree, so that I can use later in my esql code avoiding hardcode values like (TT,DD and HH)?.
or is there any way I can get tag values(TT,DD and HH) using esql even tough ther are not appearing in the message tree? _________________ Bravo |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 3:22 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Is there any way to get the Tags in message tree, so that I can use later in my esql code avoiding hardcode values like (TT,DD and HH)? |
Nope. You don't need tags in the message tree. You need tags in your output message definition ( so the TT, DD, HH are in the message set, not in the code ).
What I'm trying to say ( very badly ) is that TT, DD and HH are tags, and the TDS parser can write tags as well as parse them. Try it - modify a field value in your input message and let it propagate to an output node. The output message will be identical to the input apart from the changed field value.
Quote: |
is there any way I can get tag values(TT,DD and HH) using esql even tough ther are not appearing in the message tree? |
Well, the names of the elements which carry those tags are available in the message tree. That's the beauty of the WMB programming model. The message flow deals with the logical structure ( names and values ) only. The physical format ( markup, code page, physical types ) is all hidden in the message set. |
|
Back to top |
|
 |
Bravo |
Posted: Mon May 12, 2008 8:51 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Thanks for your inputs... _________________ Bravo |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|