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 » difference of BITSTREAM() function between the v2.1 and v5

Post new topic  Reply to topic
 difference of BITSTREAM() function between the v2.1 and v5 « View previous topic :: View next topic » 
Author Message
csongebalazs
PostPosted: Thu Jan 27, 2005 2:08 am    Post subject: difference of BITSTREAM() function between the v2.1 and v5 Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

For example the Environment.MSG was set with a character string.

In the v5, the result of the BITSTREAM(Environment.MSG) is a BIG NULL, but in the v2.1 its result was the BLOB representation of the string.

Why?

Hi

Balazs
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Thu Jan 27, 2005 3:32 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

Here is a short test:

Code:
CREATE COMPUTE MODULE BISTREAM_TEST_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyEntireMessage();
         DECLARE szoveg CHAR 'proba';
         SET Environment.szoveg = szoveg;
         SET OutputLocalEnvironment.szoveg = szoveg;
      
         --SET Environment.bit_fix_szoveg = COALESCE(BITSTREAM(szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_environment = COALESCE(BITSTREAM(Environment.szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_loc_out_environment = COALESCE(BITSTREAM(OutputLocalEnvironment.szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_root = COALESCE(BITSTREAM(InputRoot.XML.Root),'EZ BIZA NULL LETT!');
         SET Environment.bit_XML = COALESCE(BITSTREAM(InputRoot.XML),'EZ BIZA NULL LETT!');
         SET Environment.bit_full_input = COALESCE(BITSTREAM(InputRoot),'EZ BIZA NULL LETT!');
      RETURN TRUE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;

   CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
   END;
END MODULE;


Its result was the following:

Code:
###################################
** Environment
(
  (0x03000000):szoveg                  = 'proba'
  (0x03000000):bit_environment         = X''
  (0x03000000):bit_loc_out_environment = X''
  (0x03000000):bit_root                = X'3c526f6f743e3c4....
  (0x03000000):bit_XML                 = X'3c526f6f743e3c486....
  (0x03000000):bit_full_input          = X'4d4420200200000000....)
----------------------------------------------------------------------------------
** LocalEnvironment
(
  (0x03000000):szoveg = 'proba'
)
----------------------------------------------------------------------------------
** Root
(
  (0x01000000):Properties = (
    (0x03000000):MessageSet      = ''
    (0x03000000):MessageType     = ''
    (0x03000000):MessageFormat   = ''
    (0x03000000):Encoding        = 546
    (0x03000000):CodedCharSetId  = 437
    (0x03000000):Transactional   = TRUE
    (0x03000000):Persistence     = FALSE
    (0x03000000):CreationTime    = GMTTIMESTAMP '2005-01-27 11:19:52.450'
    (0x03000000):ExpirationTime  = -1
    (0x03000000):Priority        = 0
    (0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
    (0x03000000):ReplyProtocol   = 'MQ'
    (0x03000000):Topic           = NULL
  )
  (0x01000000):MQMD       = (
    (0x03000000):SourceQueue      = 'IN'
    (0x03000000):Transactional    = TRUE
    (0x03000000):Encoding         = 546
    (0x03000000):CodedCharSetId   = 437
    (0x03000000):Format           = '        '
    (0x03000000):Version          = 2
    (0x03000000):Report           = 0
    (0x03000000):MsgType          = 8
    (0x03000000):Expiry           = -1
    (0x03000000):Feedback         = 0
    (0x03000000):Priority         = 0
    (0x03000000):Persistence      = 0
    (0x03000000):MsgId            = X'414d51205445535442522e514d202020ddabf44120002001'
    (0x03000000):CorrelId         = X'000000000000000000000000000000000000000000000000'
    (0x03000000):BackoutCount     = 0
    (0x03000000):ReplyToQ         = 'OUT                                             '
    (0x03000000):ReplyToQMgr      = 'TESTBR.QM                                       '
    (0x03000000):UserIdentifier   = 'db2admin    '
    (0x03000000):AccountingToken  = X'160105150000000d7a5a334d64492e43170a32eb03000000000000000000000b'
    (0x03000000):ApplIdentityData = '                                '
    (0x03000000):PutApplType      = 11
    (0x03000000):PutApplName      = 're_tanulas\teszt\mqsiput.exe'
    (0x03000000):PutDate          = DATE '2005-01-27'
    (0x03000000):PutTime          = GMTTIME '11:19:52.450'
    (0x03000000):ApplOriginData   = '    '
    (0x03000000):GroupId          = X'000000000000000000000000000000000000000000000000'
    (0x03000000):MsgSeqNumber     = 1
    (0x03000000):Offset           = 0
    (0x03000000):MsgFlags         = 0
    (0x03000000):OriginalLength   = -1
  )
  (0x01000010):XML        = (
    (0x01000000):Root = (
      (0x01000000):Header = (
        (0x01000000):ID             =  ... and so on


The SET Environment.bit_fix_szoveg = COALESCE(BITSTREAM(szoveg),'EZ BIZA NULL LETT!'); cannot be deployed at all.
The others are deployed successfuly without warnings, but the results of
SET Environment.bit_environment = COALESCE(BITSTREAM(Environment.szoveg),'EZ BIZA NULL LETT!');
SET Environment.bit_loc_out_environment = COALESCE(BITSTREAM(OutputLocalEnvironment.szoveg),'EZ BIZA NULL LETT!');

are NULL (or exactly X'').

Hi

Balazs
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 27, 2005 5:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

BITSTREAM as a function has been deprecated(unsupported and scheduled for obsolesence) since CSD3 or CSD4 of 2.1

You want to use the ASBITSTREAM function instead.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Thu Jan 27, 2005 7:24 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

In v2.1 + CSD05 the BITSTEAM(Environment.something) is working.
In v5 it is NOT!

But I followed your suggestion. The test code was changed.

Code:
         --SET Environment.bit_fix_szoveg = COALESCE(ASBITSTREAM(szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_environment = COALESCE(ASBITSTREAM(Environment.szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_loc_out_environment = COALESCE(ASBITSTREAM(OutputLocalEnvironment.szoveg),'EZ BIZA NULL LETT!');
         SET Environment.bit_root = COALESCE(ASBITSTREAM(InputRoot.XML.Root),'EZ BIZA NULL LETT!');
         SET Environment.bit_XML = COALESCE(ASBITSTREAM(InputRoot.XML),'EZ BIZA NULL LETT!');
         SET Environment.bit_full_input = COALESCE(ASBITSTREAM(InputRoot),'EZ BIZA NULL LETT!');

The result was worst.

ASBITSTREAM(Environment.szoveg) and ASBITSTREAM(OutputLocalEnvironment.szoveg) are equal X'' again.

plus, after the ASBITSTREAM(InputRoot.XML.Root) my broker had a burst of anger.

Its result was:

2005-01-27 16:06:47.242691 4012 RecoverableException BIP2488E: (.BISTREAM_TEST_Compute.Main, 11.4) Error detected whilst executing the SQL statement 'SET Environment.bit_root = COALESCE(ASBITSTREAM(InputRoot.XML.Root), 'EZ BIZA NULL LETT!');'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2005-01-27 16:06:47.242774 4012 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2005-01-27 16:06:47.242828 4012 ParserException BIP5005E: No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root.

Hi

Balazs
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Jan 27, 2005 8:18 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

For your problems with Environment and LocalEnvironment, look here : http://www.mqseries.net/phpBB2/viewtopic.php?t=19429&highlight=

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Fri Jan 28, 2005 4:44 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

Ok.
I changed my test code:

Code:
   BEGIN
      CALL CopyEntireMessage();
         DECLARE szoveg CHAR 'proba';
         
         Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';
         Create FIRSTCHILD of OutputLocalEnvironment DOMAIN 'XML' Name 'Variables';
         SET Environment.Variables.szoveg = szoveg;
--         SET Environment.szoveg = szoveg;
         SET OutputLocalEnvironment.Variables.szoveg = szoveg;
--         SET OutputLocalEnvironment.szoveg = szoveg;

         DECLARE options INTEGER FolderBitStream;

         --SET Environment.bit_fix_szoveg = COALESCE(ASBITSTREAM(szoveg),'EZ BIZA NULL LETT!');
         SET OutputRoot.XML.Root.asbit_environment = COALESCE(ASBITSTREAM(Environment.Variables.szoveg OPTIONS options),'EZ BIZA NULL LETT!');
         SET Environment.Variables.asbit_loc_out_environment = COALESCE(ASBITSTREAM(OutputLocalEnvironment.Variables.szoveg OPTIONS options),'EZ BIZA NULL LETT!');
         SET Environment.Variables.asbit_root = COALESCE(ASBITSTREAM(InputRoot.XML.Root OPTIONS options),'EZ BIZA NULL LETT!');
         SET Environment.Variables.asbit_XML = COALESCE(ASBITSTREAM(InputRoot.XML OPTIONS options),'EZ BIZA NULL LETT!');
         SET Environment.Variables.asbit_full_input = COALESCE(ASBITSTREAM(InputRoot OPTIONS options),'EZ BIZA NULL LETT!');
         SET Environment.Variables.bit_environment = COALESCE(BITSTREAM(Environment.Variables.szoveg),'EZ BIZA NULL LETT!');
         SET Environment.Variables.bit_loc_out_environment = COALESCE(BITSTREAM(OutputLocalEnvironment.Variables.szoveg),'EZ BIZA NULL LETT!');
--         SET Environment.Variables.bit_environment = COALESCE(BITSTREAM(Environment.szoveg),'EZ BIZA NULL LETT!');
--         SET Environment.Variables.bit_loc_out_environment = COALESCE(BITSTREAM(OutputLocalEnvironment.szoveg),'EZ BIZA NULL LETT!');
         
      RETURN TRUE;
   END;


After it the results of all ASBITSTREAM function were correct, but the BITSTREAM functions are dead.
The commented BITSTREAM tests are deadly too.

I'm a bit confused....

UserTrace BIP2537I: Node 'BISTREAM_TEST.Tester': Executing statement 'SET Environment.Variables.bit_environment = COALESCE(BITSTREAM(Environment.Variables.szoveg), 'EZ BIZA NULL LETT!');' at (.BISTREAM_TEST_Compute.Main, 21.4).
2005-01-28 13:34:20.297382 608 UserTrace BIP2538I: Node 'BISTREAM_TEST.Tester': Evaluating expression 'COALESCE(BITSTREAM(Environment.Variables.szoveg), 'EZ BIZA NULL LETT!')' at (.BISTREAM_TEST_Compute.Main, 21.4.
2005-01-28 13:34:20.297451 608 UserTrace BIP2538I: Node 'BISTREAM_TEST.Tester': Evaluating expression 'BITSTREAM(Environment.Variables.szoveg)' at (.BISTREAM_TEST_Compute.Main, 21.57).
2005-01-28 13:34:20.299554 608 Error BIP2628E: Exception condition detected on input node 'BISTREAM_TEST.MQInput'.
The input node 'BISTREAM_TEST.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
RecoverableException BIP2230E: Error detected whilst processing a message in node 'BISTREAM_TEST.Tester'.
The message broker detected an error whilst processing a message in node 'BISTREAM_TEST.Tester'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
RecoverableException BIP2488E: (.BISTREAM_TEST_Compute.Main, 21.4) Error detected whilst executing the SQL statement 'SET Environment.Variables.bit_environment = COALESCE(BITSTREAM(Environment.Variables.szoveg), 'EZ BIZA NULL LETT!');'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
ParserException BIP5005E: No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 28, 2005 9:51 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
BITSTREAM as a function has been deprecated(unsupported and scheduled for obsolesence) since CSD3 or CSD4 of 2.1

You want to use the ASBITSTREAM function instead.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Tue Feb 01, 2005 3:19 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

Hi!

My statement (In v2.1 + CSD05 the BITSTEAM(Environment.something) is working.) was false.
I'm sorry. Its result was X'' too.

The reason of my howler was the following.
There is a messagelog oracle database table without nullable columns. There is an insert in the ESQL code:

Code:
INSERT INTO Database.ODS2.MESSAGELOG
   (ID, DIR, MQMD_MSGID, MQMD_CORRELID,
   MSG_MQMD_BLOB, MSG_BODY_BLOB, MODIFIER, MODIFICATION)
VALUES
   (Environment.LOGID[1].NEXT, 'O', OutputRoot.MQMD.MsgId, OutputRoot.MQMD.CorrelId,
   BITSTREAM(OutputRoot.MQMD), BITSTREAM(Environment.MSG), node, CURRENT_TIMESTAMP);


In the v2.1 this insert is allways successfully contact admin the result of the BITSTREAM(Environment.MSG) is X''.
In the v5 this insert generates an exception, because NULL cannot be inserted into a non nullable column.

Hi

Balazs
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 » difference of BITSTREAM() function between the v2.1 and v5
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.