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 » V7 to V9 ASBITSTREAM Gotcha

Post new topic  Reply to topic
 V7 to V9 ASBITSTREAM Gotcha « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Wed Sep 02, 2015 1:06 am    Post subject: V7 to V9 ASBITSTREAM Gotcha Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

During a migration from V7 to V9 I noticed a problem with this bit of ESQL

Code:

         IF COALESCE(InputProperties.MessageSet,'') = '' THEN
            SET msgBlob = ASBITSTREAM (InputBody
                     ENCODING    COALESCE(InputProperties.Encoding, 546)
                     CCSID       COALESCE(InputProperties.CodedCharSetId,1208));

         ELSE
            IF COALESCE(InputProperties.MessageFormat,'') = '' THEN
               SET msgBlob = ASBITSTREAM (InputBody
                           ENCODING    COALESCE(InputProperties.Encoding, 546)
                           CCSID       COALESCE(InputProperties.CodedCharSetId,1208)
                           SET       InputProperties.MessageSet
                           TYPE       InputProperties.MessageType );
--                           FORMAT       InputProperties.MessageFormat);
            ELSE
               SET msgBlob = ASBITSTREAM (InputBody
                              ENCODING    COALESCE(InputProperties.Encoding, 546)
                              CCSID       COALESCE(InputProperties.CodedCharSetId,1208)
                              SET       InputProperties.MessageSet
                              TYPE       InputProperties.MessageType
                              FORMAT       InputProperties.MessageFormat);
               END IF;         
         END IF;   

This is in out Output Message Auditing framework.
For 99% of our flows there is no problem. But for one that just processes in input message and updates a database there was nothing in the InputBody. It was NULL.
In MB V7.0.0.4 this didn't cause any issues. But in V9.0.0.3 the code threw an exception on thr ASBITSTREAM.
This was it was trying to ASBITSTREAM a different folder. I think it is the MQMD.
Adding something so that the InputBody was not null solved the issue.

It might be a bug but I'm not sure. It might be that with the older version didn't throw an error and things are now that much tighter and it is doing what it is supposed to be doing all along.

I'm posting this here so that others might benefit from the 'gotcha' in future.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 02, 2015 5:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm reasonably sure that InputBody points to the last child of InputRoot, regardless of whether that's associated with a message parser or not.

So if the last child of InputRoot is MQMD, then that's what *should* be sent to ASBITSTREAM.

It might be easiet to just change the program triggering this flow to send some fixed data in the message, rather than no data at all. (The program writing the MQ message)
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 02, 2015 5:27 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

The Lastchild is what I thought. The code I showed is in a common Audit Framework.
I've modified the code to look to see if the InputBody is actually pointing at real data or not.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ksrocks9
PostPosted: Wed Sep 02, 2015 7:44 am    Post subject: Reply with quote

Apprentice

Joined: 11 Mar 2015
Posts: 35

I am getting the same problem in 9.0.0.3. In MB V7, it's working fine. I used ASBITSTREAM in tracking. Now in my tracking it's processing the message, but nothing in the body.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 02, 2015 7:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It really sounds like a bug in MB v7.

Or at least an odd behavior that was resolved in later versions.

InputBody should point to the last child of InputRoot. This should be the message headers if the message had no content.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 02, 2015 8:00 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

mqjeff wrote:
It really sounds like a bug in MB v7.

Or at least an odd behavior that was resolved in later versions.

InputBody should point to the last child of InputRoot. This should be the message headers if the message had no content.




I went back to the V7 broker and tested it. The InputRoot was NULL there as well but the AsBitstream didn't throw an error. Instead it produced a zero length blob.

As I said before, I put a test to see if there was indeed something recognisble in the Body Tree. If not the code I posted above was bypassed.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » V7 to V9 ASBITSTREAM Gotcha
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.