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 » Solved : MRM TDS Tagged, Fixed Length, Repeated Modelling

Post new topic  Reply to topic
 Solved : MRM TDS Tagged, Fixed Length, Repeated Modelling « View previous topic :: View next topic » 
Author Message
Ramphart
PostPosted: Wed Mar 16, 2005 12:37 am    Post subject: Solved : MRM TDS Tagged, Fixed Length, Repeated Modelling Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

Hi,

- I'm using WMQI 2.1 CSD 07 on Windows 2000.
- I'm trying to create a Message Set with a TDS layer to model a repeated structure with fixed length records (Header and Detail Lines)

[1]Input Message
- All lines ends with <LF>
- I'm using A to identify a Header Record and B for the Lines Item Records
- A records will appear once per group and B records can repeat unbounded

A19D29 189706174111000METRO KORINGPUNT F/M6826842005031500000000000000000+
B19D29 1897061741116826840012000200 00000588000000000000000000000000
B19D29 1897061741116826840022000201 00000945000000000000000000000000
A19D29 189706174118000METRO LEBOWAKGOMO F/M6827062005031500000000000000000+
B19D29 1897061741186827060012000200 00000392000000000000000000000000
B19D29 1897061741186827060022000201 00001050000000000000000000000000


[2]Message Set Structure
Code:
I've modelled the message in two ways but get the same result:

METHOD 1 (Using Tags)
*********************
Msg : CT, Ordered, VLED+Delim=<LF>
    - MessageSingle : CT, Ordered, TD+LOT=1+Delim=<LF>, {Repeat=Yes, RED=<LF>}
        - MsgHeader : CT, Ordered, FL,Tag=A
             -elements
             -...
        - MsgLines : CT, Ordered, FL,Tag=B, {Repeat=Yes, RED=<LF>}
             -elements
             -...

METHOD 2 (Using Group Indicator)
********************************
Msg : CT, Ordered, VLED+Delim=<LF>
    - MessageSingle : CT, Ordered, TFL+LOT=1, {Repeat=Yes, RED=<LF>}
        - MsgHeader : CT, Ordered, FL,GI=A
             -elements
             -...
        - MsgLines : CT, Ordered, FL,GI=B, {Repeat=Yes, RED=<LF>}
             -elements
             -...

Note: CT -> Compound Type, GI -> Group Indicator,
      FL -> Fixed Length, TFL -> Tagged Fixed Length,
      TD -> Tagged Delimited, LOT -> Length of Tag,
      VLED -> Variable Length Elements Delimited,
      RED -> Repeating Elements Delimiter


[3]Results when Parsing
Code:
  (0x1000021)MRM        = (
    (0x1000013)Msg = (
      (0x1000013)MsgHeader = (
        (0x300000B)hdrRoute               = '19D29 '
        (0x300000B)hdrConsolidationNumber = '189706'
        (0x300000B)hdrCustomerNumber      = '174111'
        (0x300000B)hdrDeliverySequence    = '000'
        (0x300000B)hdrCustomerName        = 'METRO  KORINGPUNT          F/M'
        (0x300000B)hdrOrderNumber         = '682684'
        (0x300000B)hdrDeliveryDate        = '20050315'
        (0x300000B)hdrOrderPriority       = '00'
        (0x300000B)hdrCratesQuantity      = '000'
        (0x300000B)hdrStacksQuantity      = '000'
        (0x300000B)hdrLidsQuantity        = '000'
        (0x300000B)hdrTemp                = '000000'
        (0x300000B)hdrTempSign            = '+'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgLines = (
        (0x300000B)Route               = '19D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '001'
        (0x300000B)ProductCode         = '2000200        '
        (0x300000B)Quantity            = '00000588000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgLines = (
        (0x300000B)Route               = '19D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '002'
        (0x300000B)ProductCode         = '2000201        '
        (0x300000B)Quantity            = '00000945000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgHeader = (
        (0x300000B)hdrRoute               = '19D29 '
        (0x300000B)hdrConsolidationNumber = '189706'
        (0x300000B)hdrCustomerNumber      = '174118'
        (0x300000B)hdrDeliverySequence    = '000'
        (0x300000B)hdrCustomerName        = 'METRO  LEBOWAKGOMO         F/M'
        (0x300000B)hdrOrderNumber         = '682706'
        (0x300000B)hdrDeliveryDate        = '20050315'
        (0x300000B)hdrOrderPriority       = '00'
        (0x300000B)hdrCratesQuantity      = '000'
        (0x300000B)hdrStacksQuantity      = '000'
        (0x300000B)hdrLidsQuantity        = '000'
        (0x300000B)hdrTemp                = '000000'
        (0x300000B)hdrTempSign            = '+'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgLines = (
        (0x300000B)Route               = '19D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174118'
        (0x300000B)OrderNumber         = '682706'
        (0x300000B)OrderLineNumber     = '001'
        (0x300000B)ProductCode         = '2000200        '
        (0x300000B)Quantity            = '00000392000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgLines = (
        (0x300000B)Route               = '19D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174118'
        (0x300000B)OrderNumber         = '682706'
        (0x300000B)OrderLineNumber     = '002'
        (0x300000B)ProductCode         = '2000201        '
        (0x300000B)Quantity            = '00001050000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )


[4]Problem
I need the message to Parse with MsgHeader and MsgLines grouped per Msg i.e.
Code:
MRM        = (
 Msg = (
   MsgHeader = (
     MsgLines  = (
     MsgLines  = (
 Msg = (
   MsgHeader = (
     MsgLines  = (
     MsgLines  = (
      )


AND NOT AS

Code:
MRM        = (
  Msg = (
    MsgHeader = (
  Msg = (
      MsgLines  = (
  Msg = (
      MsgLines  = (
  Msg = (
    MsgHeader = (
  Msg = (
      MsgLines  = (
  Msg = (
      MsgLines  = (
      )


How can I achieve this - Thx in advance.
_________________
Applications Architect


Last edited by Ramphart on Thu Mar 17, 2005 5:44 am; edited 2 times in total
Back to top
View user's profile Send private message
mqsidude
PostPosted: Wed Mar 16, 2005 2:54 am    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2004
Posts: 148

I would look your input message this way:

A19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>
A19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>
.
.
.

Basically each group is considered as one msg with:
* Each group repeats n times
* Group indicator is A
* <LF>B is the header-record separator
* <LF>A is the record-header separator

I think you can alter your second approach slightly to suit the above model .

-Crony
Back to top
View user's profile Send private message
Ramphart
PostPosted: Wed Mar 16, 2005 4:14 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

mqsidude wrote:
I would look your input message this way:

A19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>
A19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>

Basically each group is considered as one msg with:
* Each group repeats n times
* Group indicator is A
* <LF>B is the header-record separator
* <LF>A is the record-header separator

I think you can alter your second approach slightly to suit the above model


I don't want to go this route and it does not seem as if will work because if the parser consume the <LF>A then how will it know where the next group starts which is indicated by an A? This model suggest that my input data will have to be

A19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>
AA19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>
AA19D2918970617<LF>B19D2918970617<LF>B19D2918970617<LF>

Code:
It's worth noting that if I do exactly the same for a COMMA SEPARATED file instead of a FIXED LENGTH file then the message tree is built as required.
i.e.
  MRM        = (
    Msg = (
      MsgHeader = (
      MsgLines  = (
      MsgLines  = (
    Msg = (
      MsgHeader = (
      MsgLines  = (
      MsgLines  = (
      )


Please help me out guys.
_________________
Applications Architect
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 16, 2005 5:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Make your MessageSingle type have a Choice composition.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Ramphart
PostPosted: Thu Mar 17, 2005 12:53 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

jefflowrey wrote:
Make your MessageSingle type have a Choice composition.


Gives me the same result. Makes sense though. Why would the choice force the parser to build the tree in a different manner? I'm still stuck guys.
_________________
Applications Architect
Back to top
View user's profile Send private message
Ramphart
PostPosted: Thu Mar 17, 2005 5:21 am    Post subject: Solved Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

I've manage to solve this issue. Thx for your input

[1]Input Message
- All lines ends with <LF>
- I'm using A to identify a Header Record and B for the Lines Item Records
A19D29 189706174111000METRO KORINGPUNT F/M6826842005031500000000000000000+
B39D29 1897061741116826840012000200 00000588000000000000000000000000
A19D29 189706174111000METRO KORINGPUNT F/M6826842005031500000000000000000+
B39D29 1897061741116826840012000200 00000588000000000000000000000000
B49D29 1897061741116826840022000201 00000945000000000000000000000000
B39D29 1897061741116826840012000200 00000588000000000000000000000000


[2]Message Set
Code:
Msg : CT, Ordered, AED+Delim=<LF>
    - MessageSingle : CT, Ordered, TD+LOT=1+Delim=<LF>+GI=A, {Repeat=Yes, RED=<LF>}
        - MsgHeader : CT, Ordered, FL
             -elements
             -...
        - MsgLines : CT, Ordered, FL,{Tag=B, Repeat=Yes, RED=<LF>}
             -elements
             -...

Note: CT -> Compound Type, GI -> Group Indicator, FL -> Fixed Length,
      TD -> Tagged Delimited, LOT -> Length of Tag,
      AED -> All Elements Delimited,
      RED -> Repeating Elements Delimiter


[3]Results when Parsing
Code:
 (0x1000021)MRM        = (
    (0x1000013)Msg = (
      (0x1000013)MsgHeader = (
        (0x300000B)hdrRoute               = '19D29 '
        (0x300000B)hdrConsolidationNumber = '189706'
        (0x300000B)hdrCustomerNumber      = '174111'
        (0x300000B)hdrDeliverySequence    = '000'
        (0x300000B)hdrCustomerName        = 'METRO  KORINGPUNT          F/M'
        (0x300000B)hdrOrderNumber         = '682684'
        (0x300000B)hdrDeliveryDate        = '20050315'
        (0x300000B)hdrOrderPriority       = '00'
        (0x300000B)hdrCratesQuantity      = '000'
        (0x300000B)hdrStacksQuantity      = '000'
        (0x300000B)hdrLidsQuantity        = '000'
        (0x300000B)hdrTemp                = '000000'
        (0x300000B)hdrTempSign            = '+'
      )
      (0x1000013)MsgLines  = (
        (0x300000B)Route               = '39D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '001'
        (0x300000B)ProductCode         = '2000200        '
        (0x300000B)Quantity            = '00000588000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )
    (0x1000013)Msg = (
      (0x1000013)MsgHeader = (
        (0x300000B)hdrRoute               = '19D29 '
        (0x300000B)hdrConsolidationNumber = '189706'
        (0x300000B)hdrCustomerNumber      = '174111'
        (0x300000B)hdrDeliverySequence    = '000'
        (0x300000B)hdrCustomerName        = 'METRO  KORINGPUNT          F/M'
        (0x300000B)hdrOrderNumber         = '682684'
        (0x300000B)hdrDeliveryDate        = '20050315'
        (0x300000B)hdrOrderPriority       = '00'
        (0x300000B)hdrCratesQuantity      = '000'
        (0x300000B)hdrStacksQuantity      = '000'
        (0x300000B)hdrLidsQuantity        = '000'
        (0x300000B)hdrTemp                = '000000'
        (0x300000B)hdrTempSign            = '+'
      )
      (0x1000013)MsgLines  = (
        (0x300000B)Route               = '39D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '001'
        (0x300000B)ProductCode         = '2000200        '
        (0x300000B)Quantity            = '00000588000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
      (0x1000013)MsgLines  = (
        (0x300000B)Route               = '49D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '002'
        (0x300000B)ProductCode         = '2000201        '
        (0x300000B)Quantity            = '00000945000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
      (0x1000013)MsgLines  = (
        (0x300000B)Route               = '39D29 '
        (0x300000B)ConsolidationNumber = '189706'
        (0x300000B)CustomerNumber      = '174111'
        (0x300000B)OrderNumber         = '682684'
        (0x300000B)OrderLineNumber     = '001'
        (0x300000B)ProductCode         = '2000200        '
        (0x300000B)Quantity            = '00000588000'
        (0x300000B)WeightSlipNumber    = '000000'
        (0x300000B)Mass                = '000000000000000'
      )
    )
  )

_________________
Applications Architect
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 » Solved : MRM TDS Tagged, Fixed Length, Repeated Modelling
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.