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 » Trying to discard fields in output TDS message

Post new topic  Reply to topic
 Trying to discard fields in output TDS message « View previous topic :: View next topic » 
Author Message
Subha
PostPosted: Wed Nov 15, 2006 4:20 am    Post subject: Trying to discard fields in output TDS message Reply with quote

Apprentice

Joined: 14 Nov 2006
Posts: 33
Location: Toronto

I am trying to discard some of the messages elements in the output.Output message is of TDS type. To get that, I am setting the element to NULL using compute node. I did not set any default values in my message definition. But it is throwing error saying "Mandatory element has no value or default value assigned" .

If I give some default values , then field is not getting skipped in the output even though i have assigned it to be NULL.
Please help me.

Thanks!
_________________
Subh
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 15, 2006 4:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Output message is of TDS type
That does not tell me very much. TDS can parse and write a huge range of message styles.
- What style of message is it? ( i.e. which Data Element Separation )
- Are you using the same message type for input and output?
- Did you search the docs for 'TDS default value'?
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ad10510_.htm
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Nov 15, 2006 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

though a very basic question...

does ur msg set has min count as 0 for the elements u r trying to discard or rather populating as NULL
Back to top
View user's profile Send private message Visit poster's website
Subha
PostPosted: Wed Nov 15, 2006 4:49 am    Post subject: Trying to discard fields in output TDS message Reply with quote

Apprentice

Joined: 14 Nov 2006
Posts: 33
Location: Toronto

Input is XML type and output is TDS message (sequence of fixed length strings).
I referred IBM docs for discarding the fields and i am setting the fields to NULL without giving default values. It gave me exception. I then tried giving default values while setting the fields to NULL in ESQL. No exception is being thrown. But the output has the element which i dont expect to come.

I have given min occurs to be 0 and max occurs 1.

Please let me know if i am not clear.
_________________
Subh
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 15, 2006 5:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The first thing to do is not use CopyEntireMessage, just CopyMessageHeaders.

Then build your OutputRoot.MRM. fields in the correct order, only setting the fields that you want to set.

Then go back and look at the documentation link that kimbert posted.

Then make sure you aren't trying to set optional fields in a fixed length structure. If you say that a particular set of fields must be X bytes long, and then you try to only include Z<X bytes worth of data elements... then you're going to have to have a default value.

Then make sure you understand your data model in general.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 15, 2006 5:38 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your XML input message defines fields A, B, C and D.
Your fixed-length output message contains fields A and D.
You cannot use use same message definition for input and output. The TDS serializer will try to write exactly four fields. If it cannot do that, it will throw an exception ( which is correct behaviour - you might have missed out B and C by mistake ).
You need to define another message type for output, containing only fields A and D.
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 » Trying to discard fields in output TDS message
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.