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 » Output repeating records within repeating records.

Post new topic  Reply to topic
 Output repeating records within repeating records. « View previous topic :: View next topic » 
Author Message
Blacky
PostPosted: Sun Dec 14, 2003 9:47 pm    Post subject: Output repeating records within repeating records. Reply with quote

Newbie

Joined: 27 Nov 2003
Posts: 1

I have been asked to generate a flow to handle a stream of input records within a single message, and generate on output :-

HEADER<info><more info>
TXN_START<yet more info>
TXN_INFO...
TXN_INFO...
TXN_END<subtotals>
... <multiple repeated TXN blocks, with repeated TXN_INFO lines
FOOTER<totals>

I cannot find a way to use MRM to generate output records when I dont know what order the output records will end up in. This is a problem when MRM needs either a fixed number of repeats or a 'repeat count' variable.

It was suggested by a collegue to just make up the output data by appending strings, however I am unable to insert the appropriate newlines in the records.

I ended up creating an output MRM record consisting of repeating NULL terminated lines, then building each line as a STRING and inserting
into the repeating structure.

Then an RCD converted it to a BLOB, a COMPUTE node stripped off the 'repeatcount' which I inserted at the beginning of the record to keep MRM happy, and a further COMPUTE node does a search and replace of NULLS to NEWLINES in the output message.

There has to be a better way!!

BTW using MQSI 2.0.2

OutputMRM format

repeatcount = integer
outputdata <repeated x repeatcount>
outputline STRING null terminated
trailerdata <STRING>

The trailer data is stuff that gets put at the end of the file to mark EOF.
Currently a 'ZZZ'. I could easily have generated it in the outputdata.


My Final solution was
MQInput(xx with MRM for incoming format) ->
Compute(OutputRoot.XML = InputBody) ->
Transform(perform work. Output to MRM) ->
RCD (to BLOB) ->
Compute( strip off REPEATCOUNT ) ->
Compute( replace all NULL with 0x0A ) ->
MQOutput( output to destination ).
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Dec 15, 2003 5:33 am    Post subject: Re: Output repeating records within repeating records. Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Blacky wrote:

I cannot find a way to use MRM to generate output records when I dont know what order the output records will end up in. This is a problem when MRM needs either a fixed number of repeats or a 'repeat count' variable.


This is only true of CWF. The TDS parser can handle an unknown number of repeats.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wmqiguy
PostPosted: Mon Dec 15, 2003 7:33 am    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 145
Location: Florida

Unfortunately, the TDS parser is in 2.1+. Blacky, I'm afraid there aren't any "easy" solutions to your dilemna.

The two more obvious options are:

1. Upgrade to 2.1 FP5 and use the TDS.

2. Use NEON in 2.0.2. The only issue there is the learning curve (if you don't already use it) along with future licensing and support when you move to V5 and beyond.

My tendency would be to move to 2.1.....2.0.2 is getting a bit dated and 2.1 has some nice features you might want to look into. (Reference pointers, TDS, propagate, etc.)

Good luck.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 15, 2003 8:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wmqiguy wrote:
Unfortunately, the TDS parser is in 2.1+


Ooops. Missed his "by the way" comment.
_________________
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 » Output repeating records within repeating records.
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.