ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help TDS msg set

Post new topic  Reply to topic
 Help TDS msg set « View previous topic :: View next topic » 
Author Message
Bravo
PostPosted: Fri May 09, 2008 9:31 am    Post subject: Help TDS msg set Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Mon May 12, 2008 12:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Bravo
PostPosted: Mon May 12, 2008 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Mon May 12, 2008 11:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Bravo
PostPosted: Mon May 12, 2008 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Mon May 12, 2008 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bravo
PostPosted: Mon May 12, 2008 8:51 pm    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

Thanks for your inputs...
_________________
Bravo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help TDS msg set
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.