Topic
  • 1 reply
  • Latest Post - ‏2013-10-24T08:03:01Z by T.Amar
VF3B_Gabriel_Huerta
VF3B_Gabriel_Huerta
22 Posts

Pinned topic ESQL PROCEDURE to get a specific tree's leaf from a message

‏2013-10-21T19:08:59Z |

Hi

 

I am developing a ESQL PROCEDURE to get any leaf from XMLNSC tree and send it to log4j

I have reached below

 

DECLARE folderBlob BLOB ASBITSTREAM(InputRoot.XMLNSC.ns:boGenericServiceOrder.ns:vpProcessData,
     InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId,  '','','', FolderBitStream);
    DECLARE MsgChar CHAR CAST(folderBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
   CALL log4j(SQL.MessageFlowLabel, 'INFO', MsgChar) INTO rc;

Where InputRoot.XMLNSC.ns:boGenericServiceOrder.ns:vpProcessData is the parameter I want to be dynamic, I mean I want user to have option to indicate any tree's leaf they want to send to log4j. That's because our messages are too big and I want this function or procedure can receive selectively tree's leaf as parameter

I want to know which is the data type(UNKNOWNTYPE) for InputRoot.XMLNSC.ns:boGenericServiceOrder.ns:vpProcessData, this way I can use this data type to make my own function to send to log file any tree's leaf, my function would look like something below:

 

CREATE PROCEDURE WriteLogMsgTreeLeaf(IN treeLeaf UNKNOWNTYPE)

BEGIN

 DECLARE folderBlob BLOB ASBITSTREAM(treeLeaf,
     InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId,  '','','', FolderBitStream);
    DECLARE MsgChar CHAR CAST(folderBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
   CALL log4j(SQL.MessageFlowLabel, 'INFO', MsgChar) INTO rc;

END;

 

And this procedure can be invoked as below:

 

CALL WriteLogMsgTreeLeaf((InputRoot.XMLNSC.ns:boGenericServiceOrder.ns:vpProcessData)

 

I do not know if this idea could work, could someone with suffice expertise, tell me if this is correct, and if it is, which is the data type name for UNKNOWNTYPE?

 

 

  • T.Amar
    T.Amar
    64 Posts
    ACCEPTED ANSWER

    Re: ESQL PROCEDURE to get a specific tree's leaf from a message

    ‏2013-10-24T08:03:01Z  

    Hi,

     

    Please use UNKNOWNTYPE =  'Reference'

  • T.Amar
    T.Amar
    64 Posts

    Re: ESQL PROCEDURE to get a specific tree's leaf from a message

    ‏2013-10-24T08:03:01Z  

    Hi,

     

    Please use UNKNOWNTYPE =  'Reference'