Author |
Message
|
firoj.badsa |
Posted: Tue Aug 04, 2009 2:38 am Post subject: TDS Message set with Multiple Occurence |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
I have a fixed length input message of below type ..
1aabbbbcccccrrrr<CR><LF>
2jkkssaaaaaaoooo<CR><LF>
2jkkssaaaaaaoooo<CR><LF>
1aabbbbcccccrrrr<CR><LF>
where '1' & '2' are group indicator. they can occur any number of times in a message.
I have created 2 complex Type with
Group Indicator '1' & '2' and Group terminator <CR><LF>
And in logical property I have used choice/closed in Local Group.
While debugging I can see the first line coming up correctly .. but have issue from the 2nd line (or group indicator 2)
Pls help. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 04, 2009 2:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Those are not group indicators.
Those are tags.
And that <CR><LF> is not a group terminator, it's a delimiter.
You want a complex type that is a choice and repeats and contains an element of your 1 complex type and an element of your 2 complex type. |
|
Back to top |
|
 |
firoj.badsa |
Posted: Tue Aug 04, 2009 2:59 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
Thanks Jeff for your reply .. Any suggestion? |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Tue Aug 04, 2009 4:32 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
firoj.badsa wrote: |
Any suggestion? |
Other than create the TDS as MQJeff eluded to?
No. |
|
Back to top |
|
 |
firoj.badsa |
Posted: Tue Aug 04, 2009 5:23 am Post subject: |
|
|
 Centurion
Joined: 16 Feb 2007 Posts: 104
|
1st Complex type:
Content:
Composition:Choice
Content Validation:Closed
Min Occurs: 1
Max Occurs: 1
Complex Type:
Group Indicator: 1
Group Terminator: <CR><LF>
2nd Complex Type:
1st Complex type:
Content:
Composition:Choice
Content Validation:Closed
Min Occurs: 1
Max Occurs: 1
Complex Type:
Group Indicator: 2
Group Terminator: <CR><LF>
3rd Complex Type;(This Inclused 1st & 2nd)
Composition:Choice
Content Validation:Closed
Min Occurs: 1
Max Occurs: 1
This is the latest config I have. Still not working!. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Tue Aug 04, 2009 5:52 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
firoj.badsa wrote: |
Still not working!. |
Care to elaborate?
Also when Jeff said...
Quote: |
that <CR><LF> is not a group terminator, it's a delimiter.
|
you modelled it as a group terminator.....
Quote: |
Group Terminator: <CR><LF>
|
Same applies to the Group Indicator.
I'd have a look at Jeffs suggestions again and understand what these mean in terms of the message set that you are creating. |
|
Back to top |
|
 |
jbanoop |
Posted: Tue Aug 04, 2009 8:53 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
Dont think of that in terms of groups. Just think of your format as a Tagged Delimited message.
1aabbbbcccccrrrr<CR><LF>
2jkkssaaaaaaoooo<CR><LF>
Consider 1as a tag (which are used to identify the data that comes after it. Here the
is considered as the data. the
is the delimiter for that tagged delimited field which denotes its end.
Similar is the case with the line starting with 2.
Now in the complex tytpe that you create having both fields mentioned above, the choice will tell the parser when it is parsing the message to look for either the complex type starting with 1 as the tag or 2 as the tag.
when you put a repeats, it will allow for multiple occurances of the two fields defined above in any order. |
|
Back to top |
|
 |
|