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 » How to output non-XML data for a mainframe application

Post new topic  Reply to topic
 How to output non-XML data for a mainframe application « View previous topic :: View next topic » 
Author Message
masteringmq
PostPosted: Fri Apr 17, 2009 12:12 am    Post subject: How to output non-XML data for a mainframe application Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

The code below is to manipulate the XML message and send it as a blob. However after including the destination list, it does not send a blob message that I have manipulated, instead it send out the original xml message as the output. How to I solve the problem?


CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- call CopyEntireMessage();
-- SET OutputRoot.XML.IFX.SignonRs = InputRoot.XML.IFX.SignonRs.ClientApp.Org;
DECLARE Field1 CHAR;
DECLARE Field2 CHAR;
DECLARE Field3 CHAR;
DECLARE Field4 CHAR;
DECLARE Field5 CHAR;
DECLARE Field6 CHAR;

SET Field1 = 'OrgName:' || InputRoot.XML.IFX.SignonRs.ClientApp.Org;
SET Field2 = '!CustName:' || InputRoot.XML.IFX.SignonRs.ClientApp.Name;
SET Field3 = '!Country:' || InputRoot.XML.IFX.SignonRs.ClientApp.SCB_Country;
SET Field4 = '!TransactionDate:' || CAST(EXTRACT(DAY FROM CAST(InputRoot.XML.IFX.SignonRs.ServerDt AS DATE)) AS CHAR) || '-' || CAST(EXTRACT(MONTH FROM CAST(InputRoot.XML.IFX.SignonRs.ServerDt AS DATE)) AS CHAR) || '-' || CAST(EXTRACT(YEAR FROM CAST(InputRoot.XML.IFX.SignonRs.ServerDt AS DATE)) AS CHAR); --EXTRACT(YEAR FROM InputRoot.XML.IFX.SignonRs.ServerDt); --InputRoot.XML.IFX.SignonRs.ServerDt;
SET Field5 = '!AccountNum:' || InputRoot.XML.IFX.BankSvcRq.AcctInq.AcctID;
SET Field6 = '!AcctType:' || InputRoot.XML.IFX.BankSvcRq.AcctInq.AcctType;

IF POSITION('Current' IN InputRoot.XML.IFX.BankSvcRq.AcctInq.AcctType) > 0 THEN
SET Field6 = '!AcctType:' || REPLACE(InputRoot.XML.IFX.BankSvcRq.AcctInq.AcctType,'Current','CheckINAccount');
SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'FIX.OUTQ1';
ELSE
SET Field6 = '!AcctType:' || REPLACE(InputRoot.XML.IFX.BankSvcRq.AcctInq.AcctType,'Savings','SavingsAccount');
SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'FIX.OUTQ2';
END IF;

SET OutputRoot.BLOB.BLOB = CAST((Field1 || Field2 || Field3 || Field4 || Field5 || Field6) AS BLOB CCSID OutputRoot.MQMD.CodedCharSetId);
-- SET OutputRoot.XML.IFX.SignonRs = InputRoot.XML.IFX.SignonRs.ServerDt;
RETURN TRUE;
END;
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 17, 2009 12:18 am    Post subject: Re: Destination List Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
The code below is to manipulate the XML message and send it as a blob.


Please explain:

- the difference between a BLOB and an XML document in terms of WMQ message content

- why you're using the depreciated XML domain
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 17, 2009 1:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Please review the documentation on the properties that you have set on the Compute node that hosts this ESQL.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Fri Apr 17, 2009 7:38 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

I found the solution. The reason for using the XML is because the application developer decides to send XML based messages. But the receiver is a mainframe, therefore im converting it to a BLOB message.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 17, 2009 7:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

masteringmq wrote:
I found the solution. The reason for using the XML is because the application developer decides to send XML based messages. But the receiver is a mainframe, therefore im converting it to a BLOB message.


The XML domain is the wrong choice for XML messages.

And building the "BLOB" message by hand the way you are is the wrong thing to do as well.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Sat Apr 18, 2009 8:19 am    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

what is the best way to rebuild a message?.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Sat Apr 18, 2009 8:27 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

You could model it using a message set.

You might want to look at the TDS layer to model the outbound message
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Apr 18, 2009 10:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
But the receiver is a mainframe, therefore im converting it to a BLOB message.


Why? It'll still be in the wrong format.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Apr 18, 2009 11:22 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your problem is not connected with destination lists in any way. Please edit the abstract so that it does not mislead future readers. I suggest 'How to output non-XML data for a mainframe application'.

Please read this: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac70595_.htm
and this: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad70530_.htm

You will definitely need a message set.
Back to top
View user's profile Send private message
masteringmq
PostPosted: Sat Apr 18, 2009 9:39 pm    Post subject: Reply with quote

Master

Joined: 20 Oct 2008
Posts: 200

Well this is just the fundamentals. If I were to create a message set then I need a copybook provided by the mainframe team.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Apr 19, 2009 12:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

Changed topic name as suggested by kimbert
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
WMBDEV1
PostPosted: Sun Apr 19, 2009 3:52 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

masteringmq wrote:
Well this is just the fundamentals. If I were to create a message set then I need a copybook provided by the mainframe team.


Not true, but it helps!

How are they modelling the data you send them, this must be formalised somewhere.....
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Apr 19, 2009 8:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

masteringmq wrote:
If I were to create a message set then I need a copybook provided by the mainframe team.


No you don't
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » How to output non-XML data for a mainframe application
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.