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 » Invalid MQMD from procedure using REFERENCE

Post new topic  Reply to topic
 Invalid MQMD from procedure using REFERENCE « View previous topic :: View next topic » 
Author Message
AndyT
PostPosted: Tue May 30, 2006 12:31 pm    Post subject: Invalid MQMD from procedure using REFERENCE Reply with quote

Novice

Joined: 05 Nov 2003
Posts: 17
Location: Work

I am receiving BIP2618 Invalid MQMD errors when I try to create a basic MQMD with a common procedure.

I am not sure why the MQMD is invalid.

Here is the relevant code (hopefully)

Code:

/******************************************/
CREATE COMPUTE MODULE FLOW_CS_MBFE_F2M_MAIN
/******************************************/
   --------------------------------------
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN

      ...

      -- Log that a file was received
      CALL LogFileReceived();

      ...
            
      RETURN FALSE;
   
   END; ---- Main()

   ---------------------------------------------------------------------------------
   CREATE PROCEDURE LogFileReceived()
   ---------------------------------------------------------------------------------
   BEGIN   

      DECLARE RefRoot   REFERENCE TO OutputRoot;

      SET OutputRoot.Properties.ReplyIdentifier = MQCI_NONE; -- No correlation identifier specified.
      SET OutputRoot.Properties.MessageDomain = 'XMLNS';
      
      CALL CreateBaseMQMD(RefRoot);

      SET OutputRoot.XMLNS.CSLogging.InterfaceID = flowName;
      SET OutputRoot.XMLNS.CSLogging.IOFlag = 'I';
      SET OutputRoot.XMLNS.CSLogging.RunTimestamp = CURRENT_TIMESTAMP;
      SET OutputRoot.XMLNS.CSLogging.MQMsgID = X'000000000000000000000000000000000000000000000000';
      SET OutputRoot.XMLNS.CSLogging.MQCorrelID = X'000000000000000000000000000000000000000000000000';
      IF cntlDataExists THEN
         SET OutputRoot.XMLNS.CSLogging.ApplKey = 'FILE RECEIVED FOR ' || logProjectName;
      ELSE
         SET OutputRoot.XMLNS.CSLogging.ApplKey = 'UNKNOWN FILE RECEIVED';
      END IF;

      SET OutputRoot.XMLNS.CSLogging.MsgData = 'FILE ID = ' || inputFileId;

      SET OutputLocalEnvironment.Destination.RouterList.DestinationData.labelName ='LOG_IN_FILE';
      PROPAGATE; -- Send message to FLOW_CS_LOG to log file received
      
   END; ---- LogFileReceived()

END MODULE;

/**************************************************************************************************
   COMMON PROCEDURES AND FUNCTIONS
**************************************************************************************************/
-----------------------------------------------------------------------------------------------
CREATE PROCEDURE CreateBaseMQMD(IN ProcRef REFERENCE)
-----------------------------------------------------------------------------------------------
BEGIN
   SET ProcRef.MQMD.Version = MQMD_CURRENT_VERSION; -- Current version of MQMD structure.
   SET ProcRef.MQMD.StrucID = MQMD_STRUC_ID; -- Default identifier for message descriptor structure.
   SET ProcRef.MQMD.Format = 'MQSTR';
   SET ProcRef.MQMD.Expiry = -1; -- Non-expiring
   SET ProcRef.MQMD.MsgId = MQMI_NONE; -- Generate a new MsgId for the message
         
END; ---- CreateBaseMQMD()


The message is rejected by the MQOutput Node.

Trace Node shows
(
(0x01000000):Properties = (
(0x03000000):MessageSet = NULL
(0x03000000):MessageType = NULL
(0x03000000):MessageFormat = NULL
(0x03000000):Encoding = NULL
(0x03000000):CodedCharSetId = NULL
(0x03000000):Transactional = UNKNOWN
(0x03000000):Persistence = UNKNOWN
(0x03000000):CreationTime = NULL
(0x03000000):ExpirationTime = NULL
(0x03000000):Priority = NULL
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):Version = 2
(0x03000000):StrucID = 'MD '
(0x03000000):Format = 'MQSTR'
(0x03000000):Expiry = -1
(0x03000000):MsgId = X'000000000000000000000000000000000000000000000000'
)
(0x01000010):XMLNS = (
(0x01000000):CSLogging = (
(0x01000000):InterfaceID = (
(0x02000000): = 'FLOW_CS_MBFE_F2MQ'
)
(0x01000000):IOFlag = (
(0x02000000): = 'I'
)
(0x01000000):RunTimestamp = (
(0x02000000): = TIMESTAMP '2006-05-30 10:31:05.150028'
)
(0x01000000):MQMsgID = (
(0x02000000): = X'000000000000000000000000000000000000000000000000'
)
(0x01000000):MQCorrelID = (
(0x02000000): = X'000000000000000000000000000000000000000000000000'
)
(0x01000000):ApplKey = (
(0x02000000): = 'FILE RECEIVED FOR OWL'
)
(0x01000000):MsgData = (
(0x02000000): = 'FILE ID = 11dh08ru5_f1; NAME = ProdRegnTBB.xml.20060523092530'
)
)
)
)
Back to top
View user's profile Send private message
AndyT
PostPosted: Tue May 30, 2006 2:21 pm    Post subject: Reply with quote

Novice

Joined: 05 Nov 2003
Posts: 17
Location: Work

Here is some additional information. When I have the ESQL inside the module the process of creating the MQMD works OK.

Code:

CREATE PROCEDURE CreateBaseMQMD()
   BEGIN
      SET OutputRoot.Properties.ReplyIdentifier = MQCI_NONE;       
      SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
      SET OutputRoot.MQMD.StrucID = MQMD_STRUC_ID;
      SET OutputRoot.MQMD.Format = 'MQSTR';
      SET OutputRoot.MQMD.Expiry = -1;
      SET OutputRoot.MQMD.MsgId = MQMI_NONE;
      
   END;


Stepping through the code with the debugger and watching the MQMD being created does not indicate anything different between the 2 approaches. But when I look at the Trace Node output I notice that the message that is successful is slightly different:

Properties.ExpirationTime and MQMD.CorrelId have values when they do not in the message that fails.

(
(0x01000000):Properties = (
(0x03000000):MessageSet = NULL
(0x03000000):MessageType = NULL
(0x03000000):MessageFormat = NULL
(0x03000000):Encoding = NULL
(0x03000000):CodedCharSetId = NULL
(0x03000000):Transactional = UNKNOWN
(0x03000000):Persistence = UNKNOWN
(0x03000000):CreationTime = NULL
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = NULL
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):Version = 2
(0x03000000):StrucID = 'MD '
(0x03000000):Format = 'MQSTR'
(0x03000000):Expiry = -1
(0x03000000):MsgId = X'000000000000000000000000000000000000000000000000'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
)
(0x01000010):XMLNS = (
(0x01000000):CSLogging = (..etc, etc

I am wondering whether I have something wrong in the combination of REFERENCE to OutputRoot.MQMD and the PROPAGATE that results in the messages being different.

All suggestions gratefully accepted.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue May 30, 2006 2:27 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

This is because a REFERENCE to OutputRoot is not the same as OutputRoot itself. To be specific, a ref to OR will not create a parser, but OR itself will. You need to use CREATE FIELD with a DOMAIN of MQMD if you are using a reference to ensure a parser is created. For more info search this forum for a post by me ages ago that talks about this problem in a lot more detail.

Regards,
_________________
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 » Invalid MQMD from procedure using REFERENCE
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.