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 » Repeating fields in an output CWF missing

Post new topic  Reply to topic
 Repeating fields in an output CWF missing « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Tue May 16, 2006 3:34 am    Post subject: Repeating fields in an output CWF missing Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Hi all,

Using MQSI 2.1 (don't laugh) , trying to write out a simple undelimited string message field/field/repeating group of 3 fields for use by a simple minded Solaris app. I've used CWF message sets to read stuff in before but this is my first time the other way. Just been lucky I guess...

Anyway, it's all good and I've proved I'm assembling the MRM with a trace node thus:
Code:

0x1000021)MRM        = (
                                           (0x3000000)Type       = 'XXX-1234'
                                           (0x3000000)EngineerID = 'TEST1'
                                           (0x1000000)Stockline  = (
                                             (0x3000000)PartNumber          = 'ABC12'
                                             (0x3000000)Quantity            = '1'
                                             (0x3000000)QuantityNotSupplied = '1'
                                           )
                                           (0x1000000)Stockline  = (
                                             (0x3000000)PartNumber          = 'DEF45'
                                             (0x3000000)Quantity            = '2'
                                             (0x3000000)QuantityNotSupplied = 0
                                           )
                                           (0x1000000)Stockline  = (
                                             (0x3000000)PartNumber          = 'GHI67'
                                             (0x3000000)Quantity            = '2'
                                             (0x3000000)QuantityNotSupplied = 0
                                           )
                                           (0x1000000)Stockline  = (
                                             (0x3000000)PartNumber          = 'JKL89'
                                             (0x3000000)Quantity            = '20'
                                             (0x3000000)QuantityNotSupplied = '10'


If I write this out as XML (OutputRoot.Properties.MessageFormat = 'XML') I get exactly what I expect with 4 repeating groups. If I try and write it out as a single string (OutputRoot.Properties.MessageFormat = 'CWF') I only get the 1st group vis:
Code:
XXX-1234TEST1   ABC12     0000100001
.

The Stockline group in the message set has MinOccurs = 1 and MaxOccurs = 15. Do I need to set something else in the CWF tab to get the rest of the groups out? Am I one tick box short of success? There are no apparent errors, nothing obvious in the trace and nothing that jumps out on either a Google or a forum search.

Even tried re-reading the manuals.....

Any advice or suggestions welcomed before my forehead goes flat where I keep hitting it on the desk. Suggestions like "upgrade to a version that's not so old Noah used it to run the ark" already recorded.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue May 16, 2006 4:39 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Vitor,

Can we see the structure of the message set u created.

Regards.
Back to top
View user's profile Send private message Send e-mail
juddg
PostPosted: Tue May 16, 2006 4:42 am    Post subject: Repeat Count Reply with quote

Apprentice

Joined: 22 Nov 2004
Posts: 33

Vitor,
If you look at the CWF properties for the reference to the Stockline element you whould see a Repeat Count field which should be set to 4 in your scenario. On write of the CWF format removes any repeats over the Repeat Count value.

Regards,

juddg.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 16, 2006 5:30 am    Post subject: Re: Repeat Count Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

juddg wrote:
Vitor,
If you look at the CWF properties for the reference to the Stockline element you whould see a Repeat Count field which should be set to 4 in your scenario. On write of the CWF format removes any repeats over the Repeat Count value.

Regards,

juddg.


You're a genius! I knew there was one single thing I'd forgotten to set!

All is now well and I'm producing messages. Out of curiosity (and in case I ever need to send a variable length message) can the value be set in ESQL? I notice that if the number of repeated elements does not equal this value the CWF writer in the output node gets cross. Tried "OutputRoot.MRM.RepeatCount", "OutputRoot.CWF.RepeatCount", etc, etc for a few variations & it got cross about that as well.

In this instance, it's a fixed length so I'm happy. I love this forum.

Many, many thanks.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 7:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In CWF, you can only use two types of repeat counts - either the fixed repeat count in the model you have used already, or an integer field that must be a sibling of the repeating structure that will contain the number of repeats in the structure.

And remember that the repeat count must match exactly - neither more nor less - for CWF to parse the data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 16, 2006 8:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
And remember that the repeat count must match exactly - neither more nor less - for CWF to parse the data.
For the sake of completeeness, I'll mention that in v6, Repeat to End of Bitstream is also supported ( maxOccurs = -1 ).
Back to top
View user's profile Send private message
schofier
PostPosted: Tue May 16, 2006 8:28 am    Post subject: Reply with quote

Novice

Joined: 10 Dec 2003
Posts: 14
Location: IBM Hursley

jefflowrey wrote:
or an integer field that must be a sibling of the repeating structure that will contain the number of repeats in the structure.


And in v6, the referenced integer field no longer needs to be a direct sibling of the repeating field/structure. It can be any preceeding integer field.
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Tue May 16, 2006 9:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

schofier wrote:
And in v6, the referenced integer field no longer needs to be a direct sibling of the repeating field/structure. It can be any preceeding integer field.


Yes. It should be clear that v6 is better than v2.1. But we've been asked not to laugh at Vitor for using 2.1.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 17, 2006 11:22 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:

Yes. It should be clear that v6 is better than v2.1. But we've been asked not to laugh at Vitor for using 2.1.


It's cruel to mock the afflicted. Or in my case, the cursed!

For my part, I'd like to say that v6 is indeed better than 2.1. Almost anything is better than 2.1...

I prefer to think of myself not as using 2.1, but enduring it. One day there will be an upgrade. One day soon. Or people round here are going to start getting hurt.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Repeating fields in an output CWF missing
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.