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 » Get Message Type from a Message Set

Post new topic  Reply to topic
 Get Message Type from a Message Set « View previous topic :: View next topic » 
Author Message
Tikam
PostPosted: Wed Dec 19, 2007 7:50 am    Post subject: Get Message Type from a Message Set Reply with quote

Newbie

Joined: 15 Oct 2007
Posts: 4

Hi All,
I m using
chr_FieldType = 'dataType1';
blb_Msg =ASBITSTREAM(fieldref,int_Encoding, int_CCSId, chr_MsgSetID, chr_FieldType, chr_MsgFrmt)

to get MRM data as bitstream. But the problem is that if i provide chr_FieldType as one which doen't exist under "Messages" Structure in the .mxsd file (although it is present as "Types"), it doen't throws any exception rather just returns me a empty blob.

But i want the user to get Exception in this case.

Is there any way to find out Message Types in a message set, as i want to ensure that the chr_FieldType provided is among Message type provided.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Dec 19, 2007 7:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Just check for an empty blob...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Tikam
PostPosted: Wed Dec 19, 2007 8:06 am    Post subject: Reply with quote

Newbie

Joined: 15 Oct 2007
Posts: 4

Hi jefflowrey,

I m using this line of code in a fucntion (to be used by large team).if the function throws an error at the Testing time and the messageSet would updated accordingly.

The problem is that what if the field didn't come in data, i mean the testing is caried out with this field missing,the blob would be empty in this case too....So i can't throw User defined exception only on the basis of Empty blob...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Dec 19, 2007 8:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Tikam wrote:
Hi jefflowrey,

I m using this line of code in a fucntion (to be used by large team).if the function throws an error at the Testing time and the messageSet would updated accordingly.

The problem is that what if the field didn't come in data, i mean the testing is caried out with this field missing,the blob would be empty in this case too....So i can't throw User defined exception only on the basis of Empty blob...


So you have to check to see if the input field is not empty and the output blob is empty... AND THEN throw a user exception.

You don't need to do what you want to, which you can't do anyway.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Tikam
PostPosted: Mon Jan 07, 2008 11:58 pm    Post subject: Is There any other wat out Reply with quote

Newbie

Joined: 15 Oct 2007
Posts: 4

Thanks Jeff,

But as per the coding standards this is not the Full-Proof way to handle this scenario. You should throw a Exception only in worst cases.

Guys do we have some way of getting the array of Messages defined in the MessageSet???

Regards,
Tikam
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jan 08, 2008 1:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

No. The contents of the message set are not accessible from the message flow.
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 » Get Message Type from a Message Set
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.