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 » taking data to b converted

Post new topic  Reply to topic Goto page 1, 2  Next
 taking data to b converted « View previous topic :: View next topic » 
Author Message
wessam_sosa
PostPosted: Tue Jan 09, 2007 3:37 am    Post subject: taking data to b converted Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

Hi,
I did a message set that converts from EDIFACT to XML and vice versa, it is working successfully for all types of messages, a XML message should come to my message set and the EDI file is in an element of the XML file, i should take the data from this element to parse it and convert it to EDIFACT, my message flow is:
INPUT > Compute > OUTPUT
Quote:
What can i do OR what is the perfect ESQL to do what i need?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
wessam_sosa
PostPosted: Tue Jan 09, 2007 3:39 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

i`m using Broker v 6.0, thanks for your interest
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
fjb_saper
PostPosted: Tue Jan 09, 2007 4:03 am    Post subject: Reply with quote

Grand High Poobah

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

I believe IBM has some "canned" flows for that. You will have to shell out some extra $$ for them. Ask your IBM Rep...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
wessam_sosa
PostPosted: Tue Jan 09, 2007 4:16 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

if it can b done, then i should do it
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kimbert
PostPosted: Tue Jan 09, 2007 4:22 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
it is working successfully for all types of messages
Are you saying that you can transform XML-> EDIFACT and EDIFACT->XML successfully?
Quote:
What can i do OR what is the perfect ESQL to do what i need?
You need to use something like this
Code:
CREATE LASTCHILD OF <myPath> PARSE <myCharacterField> DOMAIN MRM SET <messageSetName> TYPE <messageName> Format <physicalFormatName>
That syntax may not be perfect, but there are plenty of examples in the docs and on this forum.
Back to top
View user's profile Send private message
wessam_sosa
PostPosted: Tue Jan 09, 2007 4:45 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

yes, it is working successfully, i used this syntax, but there is an exception appears to me which is BIP2162, this is thes ESQL code which i wrote in the compute node:

Code:
CREATE COMPUTE MODULE EDI2XML_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyMessageHeaders();
      SET OutputRoot.MRM.header = InputRoot.MRM.header;
      SET OutputRoot.MRM.contents.Transaction = InputRoot.MRM.contents.Transaction;
      DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateNone);
      
--       DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.BLOB,InputProperties.Encoding,InputProperties.CodedCharSetId);
      DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.MRM.contents.EDI.EDI_File
          OPTIONS parseOptions
         SET 'M7HENPC002001'
         TYPE 'message/contents/EDI/EDI_File'
         FORMAT 'EDIFACT');
   

   
      DECLARE creationPtr REFERENCE TO OutputRoot.MRM.contents.EDI;
      CREATE LASTCHILD OF creationPtr
      PARSE(bodyBlob
          OPTIONS parseOptions
         SET 'M7HENPC002001'
         TYPE 'message/contents/EDI/EDI_File'
         FORMAT 'EDIFACT');

       CALL CopyEntireMessage();
      RETURN TRUE;
   END;


   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER;
      DECLARE J INTEGER;
      SET I = 1;
      SET J = CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;


   CREATE PROCEDURE CopyEntireMessage() BEGIN
--      SET OutputRoot = InputRoot;
      SET OutputRoot.Properties.MessageFormat = 'XML';
   END;
END MODULE;
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Tue Jan 09, 2007 4:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The BIP2162 suggests that your data is not valid for the parser you're trying to use.

You probably want to put in the Encoding and CCSID into those ASBITSTREAMs. I don't think that will necessarily fix the problem, but it could and it's a safer move.

Also, your message type name is very strange to me.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 09, 2007 4:53 am    Post subject: Reply with quote

Grand High Poobah

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

The type name as shown is only supported in XML format (XMLNS & XMLNSC) parsers.
You cannot use an MRM parser in non XML format that way. Check the documentation.
_________________
MQ & Broker admin


Last edited by fjb_saper on Tue Jan 09, 2007 4:54 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
wessam_sosa
PostPosted: Tue Jan 09, 2007 4:53 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

i used the ENCODING and CCSID, but they made to me another exception, when i deleted them it is parsed a step more, the message type was wrote like that in the information center, so i wrote them like that
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Tue Jan 09, 2007 4:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The message type name should be the name of the Message type in your Message Definition file, for MRM messages.

It's likely not named with slashes in it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wessam_sosa
PostPosted: Tue Jan 09, 2007 5:01 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

it is not the problem coz the first time of the ASBITSTREAM is parsed correctly but the exception appears when parsing the DECLARE LASTCHILD....
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kimbert
PostPosted: Tue Jan 09, 2007 8:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi all,

There is a valid use of message types in this style, in conjunction with multipart messages. wessam_sosa does not say whether he is using multipart messages, so I cannot say whether it is correct in this case.
Quote:
i used the ENCODING and CCSID, but they made to me another exception
wessam_sosa : What was the exception? As Jeff says, ENCODING and CCSID are usually a very good idea when CASTing a BLOB.
Back to top
View user's profile Send private message
wessam_sosa
PostPosted: Wed Jan 10, 2007 3:39 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

i changed the message type name to a valid one and it is runing but there is no parsing (there is no output),now i`m trying the multipart message idea
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kimbert
PostPosted: Wed Jan 10, 2007 4:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
now i`m trying the multipart message idea
Which idea is that? ( I was not advising you to start using multipart messaging - just letting you know that your message type was not necessarily incorrect ).

If you are still having problems, can you give me a full update on the situation - otherwise I'm in danger of giving wrong advice.
Back to top
View user's profile Send private message
wessam_sosa
PostPosted: Wed Jan 10, 2007 5:49 am    Post subject: Reply with quote

Apprentice

Joined: 01 Nov 2006
Posts: 32

Hi Kembert,
now i`m trying to get the EDI file out from the XML file to another queue, i want the edi file to be in the root
the Input message:
<message>
<EDI>
<EDI_File>UNB+UNOA:1+CMA+DAMIETTA_PORT+050309:0000+DLO3617030+ +CUSCA...... etc</EDI_File>
</EDI>
</message>
and I want to get the output as

UNB+UNOA:1+CMA+DAMIETTA_PORT+050309:0000+DLO3617030+ .....etc

to allow the broker to parse it using input node,
how can i get this output??!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » taking data to b converted
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.