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 » Copying headers when there is no body.

Post new topic  Reply to topic
 Copying headers when there is no body. « View previous topic :: View next topic » 
Author Message
fitzcaraldo
PostPosted: Sun Dec 14, 2003 10:20 pm    Post subject: Copying headers when there is no body. Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

Hello,

We have a situation where empty messages can occur on our network. These can be empty in the sense that they have an MQMD but no body or an MQMD & RFH2 but no (further) body.

This is a problem for us because code is already in place that uses the "Copy Headers Only" snippet (which ignores the last header) or uses references to InputRoot.Body (which actually returns the MQMD or RFH2).

We have a custom input subflow that wraps MQInput. Can anyone suggest a way that we could explicitly set an empty (as opposed to NULL) body in ESQL when none was supplied.

How have some of you handled this?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 15, 2003 5:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Something like
Code:
set OutputRoot.BLOB.BLOB = CAST(' ' as BLOB);

(with spaces in the quotes)?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wmqiguy
PostPosted: Mon Dec 15, 2003 7:39 am    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 145
Location: Florida

Jeff:

It sounds like there may or may not be a payload, so you would need to add some evaluation around that or you would delete any true messages that had a payload.

Shooting from the hip here in pseudocode (time is precious):

IF OutputRoot.BLOB.BLOB = NULL or OutputRoot.BLOB.BLOB = ''
THEN
SET OutputRoot.BLOB.BLOB = CAST(' ' AS BLOB);
END IF

Haven't actually tried this, but worth a shot.
Back to top
View user's profile Send private message
fitzcaraldo
PostPosted: Mon Dec 15, 2003 2:02 pm    Post subject: Reply with quote

Voyager

Joined: 05 May 2003
Posts: 98

But it's more complicated than that. Can't necessarily assume the payload is a BLOB - it may be MRM, XML or BLOB...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 15, 2003 2:57 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fitzcaraldo wrote:
But it's more complicated than that. Can't necessarily assume the payload is a BLOB - it may be MRM, XML or BLOB...


You might be able to check the FIELDNAME of the OutputRoot.[LAST] (which is equivalent to OutputBody) to see if it's one of several values.
_________________
I am *not* the model of the modern major general.
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 » Copying headers when there is no body.
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.