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 » Encoding null

Post new topic  Reply to topic
 Encoding null « View previous topic :: View next topic » 
Author Message
fjcarretero
PostPosted: Mon May 17, 2004 2:37 am    Post subject: Encoding null Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Hi all,

I am working with TDS messages (all fields are fixed length). If a field containing a date is not populated it should have a default value of spaces. The type of these fields is 'date'. I need to to this for both incoming and outgoing messages.

I have read that this could be done setting 'Encoding null' property to 'NullLiteralValue' and 'Encoding null value' to spaces. Unfortunately it is not working.

Could anybody tell me how to make it work?

TIA

Regards
Felipe
Back to top
View user's profile Send private message
wooda
PostPosted: Mon May 17, 2004 3:33 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Are you on V5 or V2.1 ?
On V5 make sure you have set the nilable logical property on the element.
On v2.1 make sure you have added a null permitted value to the element (can't remember how to this but if you're on 2.1 I'll try and remember).

regards,

alex
Back to top
View user's profile Send private message
fjcarretero
PostPosted: Mon May 17, 2004 4:07 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Thank you very much for your reply Alex. I am on V5. I have made it work.

At the moment I have to explicitly set the values to null:
Code:
SET OutputRoot.MRM.Field1 VALUE = NULL;


Is it necessary to do that?. Is there any way of WBIMB to do it automatically if the field is not populated?

Cheers
Felipe
Back to top
View user's profile Send private message
wooda
PostPosted: Mon May 17, 2004 5:03 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Null handling is for fields which have a logical value of NULL., or you want to be treated as if they had a value of NULL.
In TDS you cannot treat a field which is missing as NULL.

I assume you have a field which is missing in the message tree but you want to be written out in the output bitstream ?

If you are using TDS Fixed Length (which I think you said you were) then you should be using the default value functionality instead of null handling.

On an elements logical properties is a "Default Value" property. If you set this to your desired value (which has be the correct length) then if the field is completely missing on output it will be filled in.

regards

Alex
Back to top
View user's profile Send private message
wooda
PostPosted: Thu May 20, 2004 6:48 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Hi fjcarretero

In my last post I suggested using default value functionality.

However in your scneario where you have a date field and want it to default to all spaces then you cannot do this as the default value must be a valid logical value for the datatype of the element.

All spaces is not a valid logical value for a date field.
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 » Encoding null
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.