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 » COBOL CopyBook based Message Definition problem

Post new topic  Reply to topic
 COBOL CopyBook based Message Definition problem « View previous topic :: View next topic » 
Author Message
shalabh1976
PostPosted: Thu Aug 16, 2007 9:41 pm    Post subject: COBOL CopyBook based Message Definition problem Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

I have created a definition from a COBOL CopyBook.
I then modified all elements in the copybook to have a default value so that I do not need to create all elements explicitly in ESQL.
My flow is MQInput-->Compute-->MQOutput
Input is XML, Output is MRM based Copybook data.
When I do not set Validate on the MQOutput on the output node as 'None' I get exceptions.

Under the 'None' scenario I get proper output with correct default values.
Without it this is what I get in eventviewer:
Quote:
Message Validation failure. An element, that has been deemed complete, does not meet the minOccurs constraint.

Element, '56^XTEDTY', has 0 instances on the logical tree, but has been defined or qualified with a minOccurs constraint of 1 within its parent type/element '53^recEDCXT' of index 1.

Adjust the minOccurs constraint downwards and redeploy to the broker or increase the instances of the element in the message itself.

With default value set the element XTEDTY should be created and is when I change validation to 'None'. What is going on?
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kimbert
PostPosted: Fri Aug 17, 2007 12:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

A minOccurs constraint of 1 says that the element must exist in the message tree. If you enable validation, you must satisfy that constraint by ensuring that the element is in the message tree.

A default value provides a value for a missing element ( whether or not it has minOccurs > 0 ). The TDS and CWF output logic will use a default value only when writing fixed-length data in order to ensure that the output bitstream is well-formed.
In v6, none of the WMB parsers use default values when parsing.

One workaround would be to set minOccurs = 0. Another would be to switch off validation ( or do you need it for checking that the values conform to the simple type Value Constraints? )
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 17, 2007 9:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kimbert wrote:
A minOccurs constraint of 1 says that the element must exist in the message tree. If you enable validation, you must satisfy that constraint by ensuring that the element is in the message tree.

A default value provides a value for a missing element ( whether or not it has minOccurs > 0 ). The TDS and CWF output logic will use a default value only when writing fixed-length data in order to ensure that the output bitstream is well-formed.
In v6, none of the WMB parsers use default values when parsing.

One workaround would be to set minOccurs = 0. Another would be to switch off validation ( or do you need it for checking that the values conform to the simple type Value Constraints? )


The other option that Kimbert did not specify is to create a well formed tree by creating each mandatory element, even if its associated value is NULL. Make sure that you use the key word VALUE = NULL otherwise you might just be removing the element from the tree.

You should then have validation of your outbound message in Cobol MRM format.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » COBOL CopyBook based Message Definition problem
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.