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 » Error when putting message to queue from a propagate

Post new topic  Reply to topic
 Error when putting message to queue from a propagate « View previous topic :: View next topic » 
Author Message
EvolutionQuest
PostPosted: Fri Oct 01, 2004 6:15 am    Post subject: Error when putting message to queue from a propagate Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

I am trying to determine why I would be getting the following error. I suspect its the way my compute node is handling the propagation, but it doesn't stick out (at least for me). The broker has been recycled with no luck.

Any insight is greatly appreciated as this has put a crutch in my testing.

Code:

----------[2004-09-30 15:44:00.948596     7716   UserTrace  ]------------------
BIP2231E: Error detected whilst processing a message 'CTP.Flow.V001_Chris.MQOutput2'.

          The message broker detected an error whilst processing a message in node 'CTP.Flow.V001_Chris.MQOutput2'. The message has been
          augmented with an exception list and has been propagated to the node's failure terminal for further processing.

          See the following messages for details of the error.



----------[2004-09-30 15:44:00.948806     7716   ParserException ]-------------
BIP5354E: MTI internal error: diagnostic information 'parseRightSibling called before RefreshElementFromBitstream'.

          An internal software error has occurred in the Message Translation Interface Parser. The diagnostic information associated with this message
           is: 'parseRightSibling called before RefreshElementFromBitstream'.

          Shutdown and restart the message broker.  If the problem continues to
          occur, then restart the system.  If the problem still continues to occur contact your IBM support center.




Code:

IF MEMLIST_COUNT IS NULL THEN
  SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
  SET OutputRoot.Properties = InputRoot.Properties;
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EU050';
  SET OutputRoot.Properties.MessageType = 'LST_MYMSG'; 
  SET OutputRoot.Properties.MessageFormat = 'CWF';
  SET OutputRoot.Properties.MessageDomain = 'MRM';
  SET OutputRoot.MQMD = InputRoot.MQMD;
  SET OutputRoot.MQMD.Encoding = 785;
  SET OutputRoot.MQMD.CodedCharSetId = 37;
  SET OutputRoot.MQMD.Format = '';
  SET "OutputRoot"."MRM"."FILLER1_9" = '';
  SET "OutputRoot"."MRM"."REC_TYPE_HEAD" = '1';
  SET "OutputRoot"."MRM"."FILLER2" = '';
  SET "OutputRoot"."MRM"."PROGRAM_ID" = '';
  SET "OutputRoot"."MRM"."FILLER3_4" = '';
  SET "OutputRoot"."MRM"."FILLER4_3" = '';

  PROPAGATE;
END IF;

SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.MessageSet = 'DR563VG0EU051';
SET OutputRoot.Properties.MessageType = 'DETAIL_MSG';
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.MQMD.CodedCharSetId = 37;
SET OutputRoot.MQMD.Format = '';

IF Client_Ref.Client_Number IS NOT NULL THEN
  SET Out_Grp1_Ref."MEMLST_CLIENT_NUM" = Client_Ref.Client_Number;
ELSE
  CALL AddError(Error_Ref, TRUE, 'XXXX', '3001', Error_Severity_S, 'Client_Number', '', 'Client not found');
END IF;
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
mgk
PostPosted: Fri Oct 01, 2004 6:29 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

You have nost posted all the code, so I can't be sure what is happening, so I will ask a question or two:

What version and CSD and platform are you using?

Where does Out_Grp1_Ref."MEMLST_CLIENT_NUM" point to?

The snipit you show does not show you filling in the message body again after the first call to propogate (unless the SET of Out_Grp1_Ref does some of this). Are you sure you are doing this correctly (as each call to propogate deletes all Output* trees whe it returns)

How do you leave the node (with a return TRUE or a return FALSE?) Returning TRUE will cause a further propogate which you may not be expecting....

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
EvolutionQuest
PostPosted: Fri Oct 01, 2004 6:42 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

Ah, I think I know what I screwed up. Dummy me, no RETURN.

Thanks.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
EvolutionQuest
PostPosted: Fri Oct 01, 2004 9:39 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

O.K. Looking at the code closer the default would be RETURN TRUE;

I do want the message to propagate to another node downstream, i.e. Filter node which will then be routed to a MQOutput Node.

We are using WMQI 2.1 w/ latest CSD.

The goal is to have it propagate the first portion of the if statement where if MEMLST_CNT = NULL. Then propagate the second portion on the next round. I am able to get the first portion fine, but the second one I get the error message identified in the first comments.

Here is the code of the compute node:

Code:

DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
   SET OutputRoot.*[I] = InputRoot.*[I];
   SET I=I+1;
END WHILE;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE Out_PolHld_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA";
DECLARE Out_PolHld_Grp1_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA"."MEMLST_DATA_GROUP001";
DECLARE Out_PolHld_Grp2_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA"."MEMLST_DATA_GROUP002";
DECLARE Out_PolData_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_POL_DATA";
DECLARE Trans_Ref REFERENCE TO Environment.Variables.Translation_Table;
DECLARE Pol_Ref REFERENCE TO "InputBody"."POL";
DECLARE Series_Ref REFERENCE TO Environment.Variables.Lookups.Lookup.Group;
DECLARE Control_Ref REFERENCE TO Environment.Variables.Con;
DECLARE CurDate_Ref REFERENCE TO Environment.Variables.CurrentDate;
DECLARE Error_Ref REFERENCE TO Environment.Variables.Errors;
DECLARE Error_Severity_S CHARACTER;
DECLARE Error_Severity_W CHARACTER;
SET Error_Severity_S = 'S';
SET Error_Severity_W = 'W';

DECLARE Client_Ref REFERENCE TO Environment.Variables.Lookups.Client_D.Client;

DECLARE DONE INTEGER;
SET DONE = 0;
WHILE (LASTMOVE(Client_Ref) AND DONE = 0) DO
    IF Client_Ref.Relationship_Code <> 'OWNR' THEN
   MOVE Client_Ref NEXTSIBLING;
    ELSE
   SET DONE = 1;
    END IF;
END WHILE;

DECLARE MEMLIST_CNT INTEGER;
SET MEMLIST_CNT = THE(SELECT ITEM Q.Result.MQI_Con_Cnt FROM Control_Ref.Con_Group[] AS Q
  WHERE Q.Con_Name = 'Audit_List_Count');

IF MEMLIST_CNT IS NULL THEN
  SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
  SET OutputRoot.Properties = InputRoot.Properties;
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EU55a';
  SET OutputRoot.Properties.MessageType = 'MEMLST_POL_HDR_MSG'; 
  SET OutputRoot.Properties.MessageFormat = 'CWF';
  SET OutputRoot.Properties.MessageDomain = 'MRM';
  SET OutputRoot.MQMD = InputRoot.MQMD;
  SET OutputRoot.MQMD.Encoding = 785;
  SET OutputRoot.MQMD.CodedCharSetId = 37;
  SET OutputRoot.MQMD.Format = '';
  SET "OutputRoot"."MRM"."FILLER1_9" = '';
  SET "OutputRoot"."MRM"."REC_TYPE_HEAD" = '1';
  SET "OutputRoot"."MRM"."FILLER2" = '';
  SET "OutputRoot"."MRM"."PROGRAM_ID" = '';
  SET "OutputRoot"."MRM"."FILLER3_4" = '';
  SET "OutputRoot"."MRM"."RUN_DTE_STR" = CurDate_Ref.Month||'/'||'01'||'/'||CurDate_Ref.Century||CurDate_Ref.Year;
  SET "OutputRoot"."MRM"."FILLER4_3" = '';

  PROPAGATE;
END IF;

SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.MessageSet = 'DR563VG0EU0aa';
SET OutputRoot.Properties.MessageType = 'MEMLST_POL_DTL_MSG';
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.MQMD = InputRoot.MQMD;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.MQMD.CodedCharSetId = 37;
SET OutputRoot.MQMD.Format = '';


SET Out_PolHld_Ref."MEMLST_SSN_TID_IND" = ' ';
SET Out_PolHld_Ref."MEMLST_SSN_TID" = ' ';
SET Out_PolHld_Ref."MEMLST_BIRTH_DTE" = ' ';


SET Control_Ref.Ctrl_Group[3].Count = 1;

-- Error Processing
CREATE PROCEDURE AddError()
BEGIN
... 
END;
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Fri Oct 01, 2004 9:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is a very common problem with PROPAGATE.

When you call PROPAGATE, it passes the message to the next node, and then empties the entire Output message tree.

So you need to either copy the headers again, or copy the entire Input back to the Output, after your PROPAGATE statement.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Oct 01, 2004 9:57 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

OK,

With all the code things become clearer.

I believe that these references :

Code:
DECLARE Out_PolHld_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA";
DECLARE Out_PolHld_Grp1_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA"."MEMLST_DATA_GROUP001";
DECLARE Out_PolHld_Grp2_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_DATA"."MEMLST_DATA_GROUP002";
DECLARE Out_PolData_Ref REFERENCE TO "OutputRoot"."MRM"."MEMLST_POL_DATA";


Are being set to invalid when the PROPAGTE returns (because as I said earlier "each call to propogate deletes all Output* trees when it returns"). This means that you need to Copy the bits from InputRoot that you need over to OutputRoot and then move the references to the right place again and then it should work.

You also appear to be doing more work that you need to, in that you copy everything under inputroot over to outputroot at the start of the code, but then copy the properties and the mqmd over again in the case where MEMLIST_CNT IS NULL which is unnecessary

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
EvolutionQuest
PostPosted: Fri Oct 01, 2004 10:45 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

O.K. maybe I am completely brain dead which is greatly possible, but I was pretty sure I was recopying the headers. As for the extra fluff, its not my choice just a requirement.

Now the references I am a little baffled by. Similar to 'C' pointers what you are saying that once the propagate occurs the address is moved forward which hits dead space (we hope)? Since the requirement is to use references as often as possible where would I do this, i.e. in the true portion of the if statement?


Code:

  SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
[b]SET OutputRoot.Properties = InputRoot.Properties; [/b]
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EU55a';
  SET OutputRoot.Properties.MessageType = 'MEMLST_POL_HDR_MSG'; 
[b]SET OutputRoot.Properties.MessageFormat = 'CWF';[/b]
[b]SET OutputRoot.Properties.MessageDomain = 'MRM'; [/b]
[b]  SET OutputRoot.MQMD = InputRoot.MQMD; [/b]
  SET OutputRoot.MQMD.Encoding = 785;
  SET OutputRoot.MQMD.CodedCharSetId = 37;
  SET OutputRoot.MQMD.Format = '';


Take a simple example of propagation:

Code:

SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageFormat = 'TDS';

DECLARE J INTEGER;
DECLARE K INTEGER;
SET J = 1;
SET K = CARDINALITY("InputBody"."FullName"[]);
WHILE (J <= K) DO

  SET OutputRoot.Properties = InputRoot.Properties;
  SET OutputRoot.Properties.MessageSet = 'DRDRDRDR';
  SET OutputRoot.Properties.MessageType = 'FullName_2';
  SET OutputRoot.Properties.MessageDomain = 'MRM';
  SET OutputRoot.Properties.MessageFormat = 'TDS';
  SET OutputRoot.MQMD = InputRoot.MQMD;

  SET "OutputRoot"."MRM"."FullNameRev"."LastName" = RTRIM(FULLNAME."FullName"[J]."LastName") || ',';
  SET "OutputRoot"."MRM"."FullNameRev"."FirstName" = FULLNAME."FullName"[J]."FirstName";
  SET "OutputRoot"."MRM"."FullNameRev"."MiddleName" = FULLNAME."FullName"[J]."MiddleName";

  PROPAGATE;
  SET J = J + 1;

END WHILE;
RETURN FALSE; /* don't want to forward to next node */



The only different is there is no code after the while loop, where in my situation I want to propagate the first portion of the compute node, i.e. just the true portion of the IF statement, and then come around again to get the last portion. I personally haven't done propagation this way, so your insight is greatly appreciated.[/b]
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Fri Oct 01, 2004 11:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MGK - those references shouldn't be valid in the first place, if I understand things properly.

He's creating them immediately after he has copied Headers, but all of them are pointing to children of MRM. Which won't be there... So either they're valid after propagate or they aren't valid to begin with.

The basic problem is that he needs to add code to copy the headers again AFTER his PROPAGATE and BEFORE his end if. That will ensure that the message looks right before he gets ready to send "the second part".

In fact, he could basically swap the order of his if statement subsections
Code:
IF MEMLIST_COUNT IS NULL THEN
-- Body manipulation section
  SET "OutputRoot"."MRM"."FILLER1_9" = '';
  SET "OutputRoot"."MRM"."REC_TYPE_HEAD" = '1';
  SET "OutputRoot"."MRM"."FILLER2" = '';
  SET "OutputRoot"."MRM"."PROGRAM_ID" = '';
  SET "OutputRoot"."MRM"."FILLER3_4" = '';
  SET "OutputRoot"."MRM"."FILLER4_3" = '';

--proagate
  PROPAGATE;

--copy headers section
  SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
  SET OutputRoot.Properties = InputRoot.Properties;
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EU050';
  SET OutputRoot.Properties.MessageType = 'LST_MYMSG';
  SET OutputRoot.Properties.MessageFormat = 'CWF';
  SET OutputRoot.Properties.MessageDomain = 'MRM';
  SET OutputRoot.MQMD = InputRoot.MQMD;
  SET OutputRoot.MQMD.Encoding = 785;
  SET OutputRoot.MQMD.CodedCharSetId = 37;
  SET OutputRoot.MQMD.Format = '';

END IF;


But the limited subset of properties he's copying may not be sufficient. I'd include
Code:
SET C = CARDINALITY(InputRoot.*[]);
SET I = 1;
WHILE I < C DO
   SET OutputRoot.*[I] = InputRoot.*[I];
   SET I=I+1;
END WHILE;
at the front of the section I labeled "Copy Headers section".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Oct 01, 2004 11:45 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi Jeff,

You're right, it's been a long day over here

As The MRM body of the message has not been copied accross, the OutputRoot references are never valid. And References that are declared to somewhere that does not exist are initialized to point to the Root of the Tree in which they were trying to be pointed (OutputRoot in this case).

The way references work, is that they "stick" to their target unless you either MOVE them somewhere else (And they "stick" to their new target), or delete the "target", which is the element that they point too (which invalidates all references to it). In this case the references are never valid as the MRM body has not been copied accross in the first place. However, if it had been, then PROPOGATE would invalidate the references as it deletes EVERYTHING under ALL the output* trees, thus invalidating ALL references into ANY of theose trees, when it returns. So when a PROPOGATE statement returns, it is like entering the node for the first time as far as the Output* trees are concerned. You have to do ALL initialization of those trees such as copy headers, body elements, and setupany references again.

I hope this makes things a little clearer.

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
EvolutionQuest
PostPosted: Wed Oct 06, 2004 12:12 pm    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

Sorry I didn't get back on whether it worked or not. I was finally able to get things working, but it was an odd solution.

Following Jeff's recommendation I was able to piece things together, but the odd part was I had to define the MQMD and Properties twice more than I anticipated:

Code:


IF MEMLIST_COUNT IS NULL THEN
  SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EBBBB';
  SET OutputRoot.Properties.MessageType = 'HLDR_HEADER_MSG'; 
  SET OutputRoot.Properties.MessageFormat = 'CWF';
  SET OutputRoot.Properties.MessageDomain = 'MRM';

  SET "OutputRoot"."MRM"."FILLER1_9" = '';
  SET "OutputRoot"."MRM"."REC_TYPE_HEAD" = '1';
  SET "OutputRoot"."MRM"."FILLER2" = '';
  SET "OutputRoot"."MRM"."PRGRM_ID" = '';
  SET "OutputRoot"."MRM"."FILLER3_4" = '';
  SET "OutputRoot"."MRM"."HDR_RUN_DTE_STR" = CurDate_Ref.Month||'/'||'01'||'/'||CurDate_Ref.Century||CurDate_Ref.Year;
  SET "OutputRoot"."MRM"."FILLER4_3" = '';

  PROPAGATE;

  SET C = CARDINALITY(InputRoot.*[]);
  SET I = 1;
  WHILE I < C DO
   SET OutputRoot.*[I] = InputRoot.*[I];
    SET I=I+1;
  END WHILE;

  SET OutputRoot.Properties = InputRoot.Properties;
  SET OutputRoot.Properties.MessageSet = 'DR563VG0EBBBB';
  SET OutputRoot.Properties.MessageType = 'HLDR_HEADER_MSG'; 
  SET OutputRoot.Properties.MessageFormat = 'CWF';
  SET OutputRoot.Properties.MessageDomain = 'MRM';
  SET OutputRoot.MQMD = InputRoot.MQMD;

END IF;

SET InputLocalEnvironment = OutputLocalEnvironment;
SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'MyQueue';
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.MessageSet = 'DR563VG0ECCCC';
  SET OutputRoot.Properties.MessageType = 'HLDR_DTL_HEADER_MSG'; 
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.MQMD = InputRoot.MQMD;

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
mgk
PostPosted: Thu Oct 07, 2004 12:38 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

OK,

You are doing slight more than is necesary, which whilst it will work, will not perform as well as it could:

The following code in you IF block will (as I'm sure you know) copy all your headers from InputRoot to OutputRoot (that is everything but the body of the message).

SET C = CARDINALITY(InputRoot.*[]);
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;


Therefore, inside the IF block, the following 2 lines of code are not needed (as your WHILE loop above will have copied them over already)
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.MQMD = InputRoot.MQMD;


Also, they should not be needed after the IF block either as I think you would have copied it over before the IF block was entered when you did the same while loop when you entered the node (although you did not post all the code this time, so I'm not sure)

Also, I imagine you did not really mean to overwrite your INPUTLocalEnvronment here did you?
SET InputLocalEnvironment = OutputLocalEnvironment;

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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error when putting message to queue from a propagate
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.