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 » If not FIELDTYPE, then what?

Post new topic  Reply to topic
 If not FIELDTYPE, then what? « View previous topic :: View next topic » 
Author Message
fitzcaraldo
PostPosted: Fri Feb 27, 2004 10:08 pm    Post subject: If not FIELDTYPE, then what? Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

If I cannot use FIELDTYPE to determine the TYPE of a field itself (rather than the type of the data) what can I use?
I want to know if a given field is a BLOB or a char or a numeric. Is there a way?
Back to top
View user's profile Send private message
mgk
PostPosted: Sun Feb 29, 2004 9:32 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

No there is not a way to determine the DATATYPE of a variable or field.
If you are not sure what the ytype of the value is you should CAST it to the type you need. However bear in mind that not all possible CASTS are supported...

Remeber if you are using Generic XML then every field will be CHARacter, if you are modeling your message in the MRM then the type will be what ever you modelled it to be (so a CAST may not be needed)

You don't say what you are doing, but you will get better performance if you can avoid unnecessary CASTing by designing your flows to process
messages in which you know the expected types of the data in the message at design time. This means using seperate flows based on message type rather than CASTing or using lots of FILTER nodes to determine the type at runtime.

Cheers,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
fitzcaraldo
PostPosted: Sun Feb 29, 2004 1:03 pm    Post subject: Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

Thanks for that mgk. I had reached the same conclusion.

I have a procedure that builds a correlid from Environment provided data. The procedure expects a CHAR string, pads it to 24 bytes then casts the whole thing to a BLOB which it returns.
My problem was that sometimes the user provides a BLOB rather than a CHAR string (not unreasable in the circumstances). As you suggest I can get around this problem by casting whatever they give to a CHAR before calling the procedure.
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 » If not FIELDTYPE, then what?
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.