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 » CWF-TDS transformation [Resolved]

Post new topic  Reply to topic
 CWF-TDS transformation [Resolved] « View previous topic :: View next topic » 
Author Message
drajib
PostPosted: Wed Jun 11, 2003 10:03 am    Post subject: CWF-TDS transformation [Resolved] Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Hi,

I've the following TDS Message
Code:
PROTO.CWF.2.TDS
  + s1  s1_TYPE
  + s2  s2_TYPE
  + s3  s3_TYPE

which is based on the following Type s
Code:
s  s_TYPE
  - s1  s1_TYPE                 (Fixed length)
      f1_1  String                (4)
      f1_2  String                (5)
  - s2  s2_TYPE                 (Fixed length)
      f2_1  String                (9)
      f2_2  String                (5)
  - s3  s3_TYPE                 (Fixed length)
      f3_1  String                (2)
      f3_2  String                (2)


The actual data is of CWF format e.g.
Code:
!1234abcde|123456789abcde*12ab

where
Code:

'!', '|' and '*' are the Group Indicators for s1, s2 and s3 respectively.


The MRM parser is parsing it perfectly as
Code:
s
  - s1
      f1_1                (1234)
      f1_2                (abcde)
  - s2
      f2_1                (123456789)
      f2_2                (abcde)
  - s3
      f3_1                (12)
      f3_2                (ab)


My question is could we handle a scenario where s2 is optional and repeating! Is there any other way (may be not with Group Indicators)?

Or, it can't be done due to current limitations with MRM.

I'm using WMQI 2.1 CSD4.

Thanks in advance


Last edited by drajib on Thu Jun 19, 2003 8:32 am; edited 4 times in total
Back to top
View user's profile Send private message
skn
PostPosted: Wed Jun 11, 2003 10:09 am    Post subject: Reply with quote

Centurion

Joined: 21 May 2003
Posts: 112
Location: Dallas

you can set the REPEAT property to YES in the compound type member properties and set the MIN OCCURS to 0.
Back to top
View user's profile Send private message
drajib
PostPosted: Wed Jun 11, 2003 10:24 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

I tried that, however in that scenario, the segment 's3' is not getting populated. This is from the Control Center Debugger
Code:
MRM
  s1
     f1_1     1234
     f1_2     abcde
  s2
     f2_1     123456789
     f2_2     abcde

when I send the same message
Back to top
View user's profile Send private message
skn
PostPosted: Wed Jun 11, 2003 3:11 pm    Post subject: Reply with quote

Centurion

Joined: 21 May 2003
Posts: 112
Location: Dallas

u sure u put the min occurence to 0.
Back to top
View user's profile Send private message
drajib
PostPosted: Wed Jun 11, 2003 11:50 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Definitely sure that I'm definitely doing that
Back to top
View user's profile Send private message
skn
PostPosted: Thu Jun 12, 2003 5:13 am    Post subject: Reply with quote

Centurion

Joined: 21 May 2003
Posts: 112
Location: Dallas

i think u need change the group indicators.

try it with someting like this

!1234abcde*123456789abcde

i am presuming u are using

!1234abcde|123456789abcde
That should work.
Back to top
View user's profile Send private message
drajib
PostPosted: Thu Jun 12, 2003 5:42 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Thanks for all your efforts. But have you tried it yourself to see that the output is as expected?

s2 being the optional repeating segment, I have tried out with the following set of input messages & viewed the corresponding results in Control Center Debugger adding a breakpoint just after the input node
Code:
No s2 -
!1234abcde*12ab

Code:
Single s2 -
!1234abcde|123456789abcde*12ab

Code:
Multiple s2 -
!1234abcde|123456789abcde|987654321mnopq*12ab
Back to top
View user's profile Send private message
Craig B
PostPosted: Thu Jun 19, 2003 3:26 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Unfortunately in the MRM-TDS layer it is not possible to control repetitions using the Group Indicators. In this particular case, when the S2 structure is set to repeating then the TDS parser will enter this structure, but because the number of repeats is unbounded and unspecified then the presence of a group indicator for the following structure (S3) is not enough to terminate the repetitions.

I would actually model this message in a slightly different way if repetitions are required. I would remove the Group Indicators from S1 ,S2 and S3, and change the Data Element Separation of the parent message to be "Tagged Fixed Length". The length of Tag could be set to one, and then the the child structures (S1, S2 and S3) can have there Tags set as !, | and * respectively. Now the TDS parser will use these tags to identify the structures instead of group indicators. However, this now gives the advantage that repetitions can be used.

The difference comes in that with a Fixed length parent and Group Indicators, allocated to the fields is still done sequentially. Where as with Tagged environments the parser extracts the Tag and asks the high level parents if one of its children has a tag of this name, and if so allocates it to that.

This change should allow you to parse the message, but it does change the nature of your message such that before S1 had to occur before S2, and S2 before S3. However, in the Tagged model, S2 would be allowed before S1 which may not give you what you require. However, you should be able to set other settings to stop this from occurs, by defining the parent as a 'Sequence' along with possible other settings.

Hope this helps.
_________________
Regards
Craig
Back to top
View user's profile Send private message
drajib
PostPosted: Thu Jun 19, 2003 8:31 am    Post subject: Resolved CWF-TDS transformation Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Worked like a charm! Thanks a lot Craig.
Please continue to share with us your insights in this forum.
Best regards

PS> Could I carry this a bit further! Going by the solution, the specific tags are getting lost. What if there is a need to carry them forward as a part of the message?

Anyone/Craig again?
Back to top
View user's profile Send private message
Craig B
PostPosted: Thu Jun 19, 2003 9:47 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

When you say that the tags are lost then what do you mean? Do you mean that within the message tree fields you do not see the tags? When you specify mark up characters in TDS such as the Group Indicators, terminators, delimiters and tags etc, then you are saying that these characters separate your data in the message. Therefore these are absorbed by the parser and the real data that was extracted in populated in your message. There is one exception to this when using Tagged Delimited. This data element separation allows fields that are not in the message definition and therefore the field name becomes whatever the tag is.

When writing a new output message then the TDS writer will take the message tree constructed and then form a bitstream based on this. During this process, the TDS 'mark up' characters will be inserted into the bitstream appropriately to separate the data again.

Therefore these will always appear in the message but not in message tree. Do you need these characters in the message tree? If so, then they are data and not separation characters. If this is the case then you may need to use TDS Data Patterns as the separation technique.
_________________
Regards
Craig
Back to top
View user's profile Send private message
drajib
PostPosted: Fri Jun 20, 2003 12:07 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

Craig,

Understood! Thanks for clearing it up again.

Best regards,

Rajib.
Back to top
View user's profile Send private message
drajib
PostPosted: Fri Jun 20, 2003 2:25 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

I've searched for references/examples of working with TDS Data Patterns but could not come up with anything significant. Any pointers!

Thanks in advance.


Last edited by drajib on Tue Jun 24, 2003 6:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Craig B
PostPosted: Fri Jun 20, 2003 3:28 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

This functionality was introduced in WMQI V2.1 CSD03 and therefore is documented in the latest Working with messages book. There is a section called "Using regular expressions to parse data elements" in the "Working with Tagged Delimited string messages" chapter. This documents the functionality with some examples.
_________________
Regards
Craig
Back to top
View user's profile Send private message
drajib
PostPosted: Fri Jun 20, 2003 4:54 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 42
Location: India

And you bet, all this time I was following the earlier version !!!

Thanks Craig.
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 » CWF-TDS transformation [Resolved]
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.