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 » Tagged Delimited problems

Post new topic  Reply to topic Goto page 1, 2  Next
 Tagged Delimited problems « View previous topic :: View next topic » 
Author Message
hampe98
PostPosted: Mon Aug 28, 2006 12:09 am    Post subject: Tagged Delimited problems Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Hi All,

I´m trying to create a message set to support a format like this:

{header={type=abcd}|entry1={tag=value}|entry2={tag=value}|entry3={tag1=value|tag2=value.....

The problem I´m having is that you need to specify a tag name for each tag entry in the message and I can´t know how many "entry1...entry(n)" or "tag1..tag(n)" there will be in a message. There is a feature that allows you to use regexp for data but I need that same functionality to distinguish tags.

Any one got a clue how to go about this?

Regards,
Hampus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 1:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use two tags - "entry" and "1", "2", "3", etc.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 2:18 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

But I still don´t know how many 1, 2, 3 etc there are going to be.

It could be entry1..entry5, entry1..entry10 or entry1..entry1000.

I should be possible to use regexp on tha tag name as it is with data.

/Hampus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 2:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you don't know how many there are going to be, then I hope you don't need to model 1 different than 2 - that they're all "entries", with the same structure.

So model the tag as "entry", and model the 1,2, etc as an integer.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 2:43 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Ok, how do I do that then? As for now I´m using a Data Element Separation of Tagged Delimited, Group Indicator {, Group Terminator } and Delimiter |

I only get an error saying that entry1 is an invalid member because I can´t create 1000 or more elements just to model 1000 or more tags that only differ by an incremented number.

The message looks like this:

entries={entry1={tag=value|tag2=value|tag3=value}|entry2={tag=value|tag2=value|tag3=value} ... {entry1000={tag=value|tag2=value|tag3=value}}

Regards,
Hampus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 3:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You create a type for 'entry'. This will be a Tagged Variable Elements Delimited group. It will have two children - one a filler element that will hold the numbers and the "=". The second will be a group for the children, that will have group indicator { and group delimiter }, and a delimiter of |.

The message group will hold an element of the 'entry' type, which will have a tag of "entry".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 3:20 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Ok, but I can´t find a "Tagged Variable Elements Delimited" group. I´m using WBIMB 5.x.

/Hampus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 3:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's the Data Element Separation.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 4:03 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Yes, but I can´t find a Data Element Separation -type which is named "Tagged Variable Elements Delimited".

I´ve got:
Tagged Delimited
Tagged Fixed Length
Tagged Encoded Length
All Elements Delimited
Variable Length Elements Delimited
etc etc
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 4:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

hampe98 wrote:
Variable Length Elements Delimited

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 5:42 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Can´t get it to work. Do you know if there are any good documentation in handling such cases?

Thanks for all your help!

Regards,

Hampus
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 28, 2006 6:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Not a straightforward scenario, but it ought to be possible. As you have suggested, the main problem is dealing with the integer suffix on the tag names. TDS does not have an automatic way of doing this, so you will need to embed a group with Data Element Separation 'Use Data Pattern' to consume the suffix.

Something like
Code:

Group Name=RepeatingEntry Data Element Separation=Use Data Pattern
    Element Name='Entry' Data Pattern='entry\d+'  ( I think \d is the correct way to specify a digit. It's in the docs anyway)


Put a reference to this group in place of your current 'entry' element.
Iterate until you achieve success!

Let us know how you get on. This post was done in a hurry!
Back to top
View user's profile Send private message
hampe98
PostPosted: Mon Aug 28, 2006 11:50 pm    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

Well, that seems to work. The broker identifies the element but throws an exception saying that an group indicator is missing at a specified position. The problem is that there is a group indicator at that position.
Any clues?

I appreciate all the help.

/Hampus
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Aug 29, 2006 3:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You will need to consume the '=' after the 'entryNN' so try adding it to the pattern: 'entry\d+='.
You might want to check whether the '=' needs to be escaped by a backslash when used in a data pattern.
Back to top
View user's profile Send private message
hampe98
PostPosted: Tue Aug 29, 2006 3:27 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2006
Posts: 10

I´ve tried that but it still doesn´t work. Same complaint as before about a missing group indicator.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Tagged Delimited problems
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.