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 » How to parse a tagged fixed length ,if the tag is same ,

Post new topic  Reply to topic Goto page 1, 2  Next
 How to parse a tagged fixed length ,if the tag is same , « View previous topic :: View next topic » 
Author Message
yshakraj
PostPosted: Mon Sep 19, 2011 5:36 am    Post subject: How to parse a tagged fixed length ,if the tag is same , Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

if i have a complex type of mymessage ,in that i have 3 elements like
AAA,BBB,CCC

and these three are associated with only one tag AAA, depending upon the data coming i need to parse the data accordingly.

Like if data is as follows..

AAA data_a BBB data_b CCC data_c

it will be parsing accordingly...
but the issue is lyk

if the data is coming lyke..

AAA data_a AAA data_b AAA data_c


as the all the tags are refering the same tag AAA.

i need to know if there is any mechanism to parse the tags according to the data coming rather than tags,bt i need to take care of tags also.

looking for some help am very much new to mb ,

thanks
yshak.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Sep 19, 2011 5:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Did you read the MRM tutorial? Seems like your question is a basic one. Or, how about did you attend the IBM-supplied training? If not, why not. FNG.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
yshakraj
PostPosted: Mon Sep 19, 2011 5:48 am    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

sorry i ddnt get u...

if u think my issue is a simple one , i will go through mrm tutorials for sure
thanks 4 that peice of info, bt i fear like this is not a simple one .let me try again ..
thanks.
yshak
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Sep 19, 2011 5:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you set Data Element Separation to 'Tagged Fixed Length' on the parent complex type ( i.e. on the complex type that contains the tagged elements )?

If not, try it now.
If you cannot get it working and you need to post again, please give an actual example of your input data ( with anything confidential removed ). And please put the example data in [c o d e] tags so that we can read it easily.
Back to top
View user's profile Send private message
yshakraj
PostPosted: Mon Sep 19, 2011 5:58 am    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

yes i tried with parent complex type as tagged fixed length and tag length is 3,
my issue is like every elemnt is searchng for same tag and need to differntiate with the values coming,
like if the first 3 elements are looking for the same tag but actual data coming is different with same tag, and the issue is first tag is repeating,
i tried with group indicator things{} ,but didnt get the proper result.
i hope i explaind correct ,if nt am sry i am new to this develpmnt.

thanks
yshak
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 19, 2011 6:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So what you're asking is "How can I create a message set that will know that when it sees 'AAA', then it means this. Unless it sees 'AAA', then it means something else".

You can't use the same tag to mean two different things when both things are at the same level.

So you need some way to determine that the repeating element has stopped repeating or some way to determine that the first non-repeating element has occurred, that is different from how the repeating element is identified.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Sep 19, 2011 9:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

yshakraj : please take some time to do all of the following steps:
a) post an example input message. Try not to change anything unless you really need to protect confidential information.
b) describe the *exact* structure of the message tree that you want to get out of the MRM parser when it parses your example message
c) Think about any other tricky details of this data format. Do we need to know about those details if we are going to help you? If so, please describe them.
Back to top
View user's profile Send private message
yshakraj
PostPosted: Tue Sep 20, 2011 11:22 pm    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

a) post an example input message. Try not to change anything unless you really need to protect confidential information.
b) describe the *exact* structure of the message tree that you want to get out of the MRM parser when it parses your example message
c) Think about any other tricky details of this data format. Do we need to know about those details if we are going to help you? If so, please describe them.


input data: AAAnameaddresslocationBBBzipcodelandmarkAAAnameaddress
locationCCCempidstate

messageset
--------------
mymsg MINOCCURENCE MAX OCCURENCE
seg1 0 1
AAA
BBB
seg2 0 1
AAA
CCC

------------------------------------------------------------
AAA,BBB,CCC ARE COMPLEX TYPES .


issue is the first element seg1 is optional and if data comes like

AAnameaddresslocationCCCempidstate

then its showing parsing error...

any idea on how to solve...
i hope i have given wat u asked kimbert,

am new to mb, pls tell me atleast which section i have to work.
looking for your reeponse.

thanks
yshakraj
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Sep 20, 2011 11:35 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Still not enough information, I'm afraid. Remember that we know *nothing* about your data format except what you tell us.

- Please do what I asked in b)
- Please explain how the parser can determine whether seg1 is present. What are the rules? This is not a question about message set design - it's a question about how this data format works.

So, in case that is not clear enough, I need at least two data streams. One with seg1, and one without. And I need a message tree for both of them. And no help unless I can read what you post, so use [c o d e] tags for all data and all structured information.
Back to top
View user's profile Send private message
yshakraj
PostPosted: Wed Sep 21, 2011 1:02 am    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

sorry kimbert,

the message set is as follows..
Code:

messageset
--------------
mymsg
seg1                                 
     AAA
        name
        address
        location
     BBB
        zipcode
        landmark
seg2                               
    AAA
        name
        address
        location
    CCC
        empid
        state


-i have given seg1 and seg2 as optional,with its min occurence is 0.


Code:

         segment        MINOCCURENCE                          MAX OCCURENCE
           seg1                    0                           1
           seg2                    0                           1




Code:


data-possible inputs
-----
AAAnameaddresslocationBBBzipcodelandmarkAAAnameaddresslocationCCCempidstate


---------or--------
AAAnameaddresslocationBBBzipcodelandmark
-------------or--------------------
AAAnameaddresslocationCCCempidstate



i need to parse all the above shown data with the message set . Is that
possible .

i made *mymsg* as tag fixed,and complex type* AAA,BBB,CCC *as fixed length.

Still iam missing anything pls dnt feel bad, pls tell me i will post the needed data .looking for your response.

thanks
yshakraj
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 21, 2011 1:14 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This looks very strange. Unless I'm missing something, the parser cannot know whether it is parsing a seg1 until it sees the 'BBB'. Is this data format an industry standard, or something invented by the organization that you are working for?

Quote:
- Please explain how the parser can determine whether seg1 is present. What are the rules? This is not a question about message set design - it's a question about how this data format works.
Back to top
View user's profile Send private message
yshakraj
PostPosted: Wed Sep 21, 2011 1:20 am    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

I know kimbert,this is strange, but i need to do this, Is this possible ,in Mb7.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 21, 2011 1:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is the seg1 *always* going to appear first?

If it is always going to appear as
seg1
seg2

then you can hardcode this sequence of types in the message flow. Then it will know that it is using seg1 first, and look for a bunch of repeats of 'AAA' until it finds 'BBB', and then complete the seg1 after that, and start looking for seg2.
Code:

msg
     <logical group, sequence, fixed length>
            seg1 <tagged/fixed length>
                  AAA data
                  BBB data
            seg2 <tagged/fixed length>
                  AAA data
                  CCC data
Back to top
View user's profile Send private message
yshakraj
PostPosted: Wed Sep 21, 2011 1:59 am    Post subject: Reply with quote

Voyager

Joined: 14 Sep 2011
Posts: 91

Code:
 

Code:

msg
     <logical group, sequence, fixed length>
            seg1 <tagged/fixed length>
                  AAA data
                  BBB data
            seg2 <tagged/fixed length>
                  AAA data
                  CCC data


kimbert i agree with you , but the issue is the seg1 is optional...,also the
AAA thing is repeating in many other segments as the starting one .
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 21, 2011 2:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Time for more information.
- You didn't answer my question about the data format. Is it yours, or it an industry standard?
- Please list all of the segments, and their child elements. Or at least list more than two of them. It is difficult to make recommendations without the full picture.

Did you notice that mqjeff has ( I think ) got the wrong idea about the AAA segments? He thinks that you can have several AAA segments together in the data stream. That's not his fault - you need to describe your format very, very carefully and accurately, otherwise we are going recommend the wrong solution.
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 » How to parse a tagged fixed length ,if the tag is same ,
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.