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 » Would this work in TDS ?

Post new topic  Reply to topic
 Would this work in TDS ? « View previous topic :: View next topic » 
Author Message
newbie13
PostPosted: Wed Apr 21, 2004 5:58 pm    Post subject: Would this work in TDS ? Reply with quote

Newbie

Joined: 21 Apr 2004
Posts: 1

Folks,

need a quick validation of the TDS message model to the actual message itself ( it would help me , as we have to hit the prod ASAP ... )

Logical Model
Message
---Record_Main_Type ( All Elements Delimited , Delimiter <CR><LF> , Repeating Element Identifier <CR><LF> )
-----Record_Sub_Type ( Choice , Fixed Length )
-------FirstType (FixedLength)
----------Element1
----------Element2
-------SecondType (FixedLength)
----------Element3
----------Element4
-------ThirdType (FixedLength)
----------Element5
----------Element6

Data itself looks like .. ( Each row of data is sepearted by <CR><LF> )

FirstypeElement1FirstTypeElement2
SecondtypeElement3SecondTypeElement4
FirstypeElement1FirstTypeElement2
SecondtypeElement3SecondTypeElement4
ThirdtypeElement5ThirdTypeElement6
....
....

If it seems correct , how does parser identify where does the next element of Record_Sub_Type occurs ( as my Record_Sub_Type has compound type of elements choice and each of them of is sepearted by a <CR><LF> , which are nothing but Record_Main_Type's repeating element identifier ... ) ???

If otherwise , what are my options , if i account for the <CR><LF> in each compound type under the Record_Sub_Type with a two character field (like after Element2 , Element4 , Element6 if i define a two byte dummy field to accomodate <CR><LF> ) , would it be ignored by the parser and wont be considered as repeating element idenitifier of the Record_Main_Type .. ?
Back to top
View user's profile Send private message
rajaram
PostPosted: Wed Apr 21, 2004 8:16 pm    Post subject: Reply with quote

Acolyte

Joined: 02 Jan 2004
Posts: 53

Hi,

First create one compound type (Record_Main_Type)(Sequence, Closed, All elements delimeted by CRLF. If there is a CRLF at the end of last row in the data, then set Group Terminator to CRLF for this compound type.

Next create another Compound Type (CHC_TYPE)(CHOICE,CLOSED,FIXED LENGTH).

Create 3 Compound Types, Under this CHC_TYPE.. FirstType,SecondType,ThirdType and add elements to the compound types.

Now, to the Record_Main_Type, Create an Element RECORD_SUB_TYPE of TYPE CHC_TYPE. For this Element, set Repeat property to YES and min and max..occurences...to what ever u want to. Also Set Repeating Element Delimeter Property to CRLF for this element.


I strongly feel this will work. Plz tell me if u need any more info or u have some problems ...

thanks,
raja
Back to top
View user's profile Send private message
vadivel
PostPosted: Wed Apr 21, 2004 10:49 pm    Post subject: Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

Hi,

Tell me if u have a record identifier in each of these records. I mean does each row begins with a unique value by which you can identify the type of record, then you can easily parse these messages usings MRM TDS.

Create a Compound Type (ITERATIVE_HEADER) of type Tagged Fixed length and set the Tag length to the record identifiers length.

Create compound types for each of the record types and then attach them to the ITERATIVE_HEADER, give the identifier value in the tag field for all these types.

Hope this helps.

Regards

Vels
Back to top
View user's profile Send private message Yahoo Messenger
rajaram
PostPosted: Thu Apr 22, 2004 12:19 am    Post subject: Reply with quote

Acolyte

Joined: 02 Jan 2004
Posts: 53

Hi,

Just to add to my above response. I feel i have missed an important pt of what u asked below...

Code:
If it seems correct , how does parser identify where does the next element of Record_Sub_Type occurs ( as my Record_Sub_Type has compound type of elements choice and each of them of is sepearted by a <CR><LF> , which are nothing but Record_Main_Type's repeating element identifier ... ) ???



Follow the Same Procedure that in described in my previous post above.

When u use a choice type, u can RESOLVE A CHOICE based on an element inside choice / any field outside choice but present in the incoming message.

Case 1:]
Suppose if a particular field outside choice, but present in the input decides which one to be selected from the choice type, if the field has value value1, then select first record, if the field has value value2, select second record, if the field has value value3, then select third record. In this case u need to create the 3 elements EL_FTYPE,EL_STYPE,EL_TTYPE of TYPE FIRSTTYPE,SECONDTYPE,THIRDTYPE. then, some thing like this should work:

if InputBody.XXXX.Field1 = value1
then Set OUtputRoot.Record_Main_Type.CHC_TYPE.EL_FTYPE = InputBody.Record_Main_Type.CHC_TYPE.EL_FTYPE
else

if InputBody.XXXX.Field2 = value2
then Set OUtputRoot.Record_Main_Type.CHC_TYPE.EL_sTYPE = InputBody.Record_Main_Type.CHC_TYPE.EL_STYPE

ELSE
IF InputBody.XXXX.Field3 = value3
Set OUtputRoot.Record_Main_Type.CHC_TYPE.EL_TTYPE = InputBody.Record_Main_Type.CHC_TYPE.EL_TTYPE

END IF;


CASE 2:
If any of the elements inside the choice type ( for eg. either element1 or element2 decide which one to be selected, Then u have 3 solns..

1. What Vadivel has told above.. use Tagged Delimeted...
or
2. Use the same procedure as case 1
or
3. Use Data Pattern Mechanism for resolving..


Please let me know if u need more info or if this is confusing.


thanks,
Raja
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 22, 2004 2:52 am    Post subject: Re: Would this work in TDS ? Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

newbie13 wrote:
If it seems correct

It seems reasonably correct to me, at first glance first thing in the morning.
newbie13 wrote:
how does parser identify where does the next element of Record_Sub_Type occurs

Your compound types are all fixed lengths. So the parser just takes segments of the bitstream of that size, and then a little more for the repeating type delimiter.

The parser won't resolve the choice for you, at least the way you have described your model, though. It will just allocate an unparsed chunk of data for each fixed size record, and determine which record type it is when you tell it which record type it is.

There are some additional complexities here if your record types are different lengths.
_________________
I am *not* the model of the modern major general.
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 » Would this work in TDS ?
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.