Author |
Message
|
satyasheel15 |
Posted: Tue Jul 01, 2003 5:33 am Post subject: Information wanted regarding TRACE NODE |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Question:
I have put ${Body} in the trace node.
But I want to ${Body to be displayed in the form of XML Message. Can anyone please tell me how to implement the same in the trace node.
Regards Always
Satyasheel |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 01, 2003 6:22 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The trace node displays the logical message tree.
XML is a physical representation of a logical message tree.
You can't configure the trace node to display a physical representation.
You could, however, do something with the ASBITSTREAM function to render the logical message as a bitstream and then tell the tracenode to display that. |
|
Back to top |
|
 |
satyasheel15 |
Posted: Tue Jul 01, 2003 6:34 am Post subject: Information Regarding Trace Node |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Dear Mr. JeffLowrey,
Thanks for your answer. Can you please throw more light on your statement:
"
You could, however, do something with the ASBITSTREAM function to render the logical message as a bitstream and then tell the tracenode to display that.
"
Please let me know how could I implement the same. Its urgent.
Thanks again in anticipation.
Regards Always
Satyasheel |
|
Back to top |
|
 |
Craig B |
Posted: Tue Jul 01, 2003 8:27 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Before the trace node, if you do something like
Code: |
SET Environment.Variables.myXML = CAST(ASBITSTREAM(OutputRoot.XML) AS CHAR CCSID OutputRoot.MQMD.CodedCharSetId);
|
Then specify ${Environment} in your trace node, you should see the character version of your XML message.
Assuming of course that you are using WMQI V2.1 CSD03 or above. _________________ Regards
Craig |
|
Back to top |
|
 |
satyasheel15 |
Posted: Tue Jul 01, 2003 8:29 pm Post subject: Information Regarding Trace Node |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Hi Craig B
Thanks for your reply.
But what I want is that I need a 0information on how to put the TRACE NODE output in the form of the XML format in trace node so that it can be easily used.
Can we do this and if yes, how. Please guide and advise.
Regards Always
Satyasheel |
|
Back to top |
|
 |
Craig B |
Posted: Tue Jul 01, 2003 11:16 pm Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
I am not sure I understand what you mean since from what I have read, my last update should give you what you need. By extracting a bitstream of the OutputRoot.XML message, converting it to character and then storing it in the Environment tree should give you access to a character representation of your XML message in the trace node. For example :
Code: |
(
Variable = (
myXML = '<myRoot><myTag1>Value</myTag1></myRoot>'
)
)
|
To help understand your requirement further could you explain why this is not what you require and possibly give an example of what you wish to see in the trace node output? Thanks. _________________ Regards
Craig |
|
Back to top |
|
 |
satyasheel15 |
Posted: Tue Jul 01, 2003 11:35 pm Post subject: Information Wanted regarding Trace Node |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Hi ,
My requirement is like this:
For example, my tace node output is:
---------------------
(
(0x1000013)MQH_Header = (
(0x300000B)SourceSystem = 'SIIMTM'
(0x300000B)SourceSystemMethod = 'I'
(0x300000B)UniqueSequenceNo. = 'A000045208000 '
(0x300000B)ResubmissionCounter = ' '
(0x300000B)IOIndicator = 'I'
(0x300000B)OriginalMessageRef = 'IMSPECIALQATESTING SIA000045208000 '
(0x300000B)ErrorIndicator = ' '
(0x300000B)RoutingIndicator = ' '
(0x300000B)Filler = ' '
)
(0x1000013)TMHeader = (
(0x300000B)ApplicationID = 'CHASUS33 '
(0x300000B)Authorizer = 'SIMLGB20XXX '
(0x300000B)AuthorizerType = ' '
(0x300000B)AccountNumber = ' '
(0x300000B)InboundDirectiveType = 'MT100 '
(0x300000B)TMUniqueKey = 'IMSPECIALQATESTING '
(0x300000B)Originator = 'TM '
(0x300000B)PUTTimestamp = '2001-10-05-16.18.34.821576'
(0x300000B)IMInstructionSequenceNumber = ' '
(0x300000B)Status = ' '
(0x300000B)Destination = ' '
(0x300000B)DestinationMessageType = ' '
(0x300000B)IMReferenceIdentifierIMRI2 = ' '
(0x300000B)IMReferenceIdentifierIMRI18 = ' '
(0x300000B)IMBlockIdentifier = ' '
(0x300000B)IMBlockSequenceNumber = ' '
(0x300000B)IMBlockQuantity = ' '
(0x300000B)IMTranId = ' '
(0x300000B)TMIdentifier = 'IMSPECIALQA'
(0x300000B)FILL = ' '
)
(0x1000013)e_SwiftEnvelope = (
(0x1000013)FIN = (
(0x1000013)SWBH = (
(0x300000B)LT_Identifier = 'CHASGB20ACBT'
(0x300000B)Session_Number = 711
(0x300000B)Sequence_Number = 12034
)
(0x1000013)FIN_OUTPUT_SWAH = (
(0x300000B)Message_Type = '100'
(0x300000B)Input_Time = TIMESTAMP '1970-01-01 13:35:00'
(0x300000B)MIR = '020827CHASGB20AAMS0016000104'
(0x300000B)Output_Date = TIMESTAMP '2002-08-27 00:00:00'
(0x300000B)Output_Time = TIMESTAMP '1970-01-01 13:35:00'
(0x300000B)Message_Priority = 'N'
)
(0x1000013)SWUH = (
(0x300000B)SW108 = '00000158'
)
(0x1000013)TEXT_BLOCK = (
(0x100001B)MT100 = (
(0x300000B)SW20 = 'FIN20030226CT043'
(0x1000013)SW32A = (
(0x300000B)DATE = TIMESTAMP '2003-01-31 00:00:00'
(0x300000B)CURRENCY = 'USD'
(0x300000B)AMOUNT = 0.00
)
(0x1000013)SW50 = (
(0x300000B)NAME_ADDRESS = 'DE AGOSTINI INVEST S.A.'
)
(0x1000013)SW53B = (
(0x300000B)PARTY_ID_ACCOUNT_NUMBER = '44033565901'
)
(0x1000013)SW57D = (
(0x300000B)PARTY_ID_ACCOUNT_NUMBER = '/SC208794'
(0x300000B)NAME_ADDRESS = 'BARCLAYS BANK PLC'
(0x300000B)NAME_ADDRESS = 'FALMOUTH'
)
(0x1000013)SW59 = (
(0x300000B)ACCOUNT = '3868000'
(0x300000B)NAME_ADDRESS = 'DE AGOSTINI INVEST S.A.'
)
(0x300000B)SW71A = 'OUR'
(0x1000013)SW72 = (
(0x300000B)NARRATIVE = '/LC/INFLI/'
)
)
)
)
)
)
And what is happening here that I have to traverse entire list like above to understand.
My requirement is that is there exist any way were we can display the above mentioned list in the form of XML. |
|
Back to top |
|
 |
Craig B |
Posted: Tue Jul 01, 2003 11:45 pm Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
So you wish to see your MRM swift message in a character XML-like format in the trace node?? In the compute node before the Trace node you could put the following :
Code: |
DECLARE msgBlob BLOB;
SET msgBlob = ASBITSTREAM( InputRoot.MRM, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, InputRoot.Properties.MessageSet, InputRoot.Properties.MessageType, 'XML');
SET Environment.Variables.myXML = CAST(msgBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
|
Then trace ${Environment} in your trace node.
If it is a newly created MRM output message, then in the ASBITSTREAM and CAST function you would need to change the InputRoot references to OutputRoot.
Is this what you require?? _________________ Regards
Craig |
|
Back to top |
|
 |
satyasheel15 |
Posted: Wed Jul 02, 2003 4:20 am Post subject: Information Wanted Regarding Trace Node |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Hi Craig,
Your code works. Thanks for that.
One more query. Is that we have to use ${Environment}. Can't we use ${Body} and change your code like following:
DECLARE msgBlob BLOB;
SET msgBlob = ASBITSTREAM( InputRoot.MRM, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, InputRoot.Properties.MessageSet, InputRoot.Properties.MessageType, 'XML');
SET OutputRoot.Variables.myXML = CAST(msgBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
I have put OutputRoot in the place of Environment.
Please advise.
Thanks again in anticipation.
Regards Always
Satyasheel |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 02, 2003 6:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
satyasheel15 wrote: |
Is that we have to use ${Environment}. Can't we use ${Body} and change your code like following:
DECLARE msgBlob BLOB;
SET msgBlob = ASBITSTREAM( InputRoot.MRM, InputRoot.MQMD.Encoding, InputRoot.MQMD.CodedCharSetId, InputRoot.Properties.MessageSet, InputRoot.Properties.MessageType, 'XML');
SET OutputRoot.Variables.myXML = CAST(msgBlob AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
I have put OutputRoot in the place of Environment. |
This probably won't quite work the way you want it to.
The first thing to understand is what OutputRoot.Variables means. That says that the parser that understands the data in the message tree under that node is named "Variables". So when you say "OutputRoot.XML", you're saying that the data under the XML node is handled by a parser named "XML" - which is presupplied. So if you use "OutputRoot.Variables", then you will probably get an exception thrown about a missing parser by your message flow at some point - possibly even at the trace node.
Secondly, if you do stick this data into your OutputRoot rather than your Environment, it will end up (unless you later remove it) in your output message. And you probably don't want that.
Unless you've been asking all along about how to convert your message into XML? That's not what you've been asking about as far as we understood - and the methods you've been given are NOT the best practices for converting MRM data into XML. |
|
Back to top |
|
 |
satyasheel15 |
Posted: Wed Jul 02, 2003 6:27 am Post subject: Information wanted regarding Trace Node |
|
|
Voyager
Joined: 04 Mar 2003 Posts: 86
|
Hi JeffLowrey,
Thanks for your information and help.
I understand what you want to say and I have implemented the same.
Regards Always
Satyasheel |
|
Back to top |
|
 |
Craig B |
Posted: Wed Jul 02, 2003 6:45 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Apologies for the use of OutputRoot.Variables ....... that was a typo. I meant to say Environment.Variables ..... well spotted! _________________ Regards
Craig |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 02, 2003 7:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Craig B wrote: |
Apologies for the use of OutputRoot.Variables ....... that was a typo. I meant to say Environment.Variables ..... well spotted! |
You did say Environment.Variables
He had a follow-up question asking if he could use OutputRoot.Variables instead. |
|
Back to top |
|
 |
|