|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsing MRM message in FIN MT502 for archiving to DB2 |
« View previous topic :: View next topic » |
Author |
Message
|
deepti0313 |
Posted: Wed Jun 24, 2009 10:22 pm Post subject: Parsing MRM message in FIN MT502 for archiving to DB2 |
|
|
Newbie
Joined: 24 Jun 2009 Posts: 5
|
Hi,
I'm tring to archive the message available to me in MRM format back to FIN format for archiving to a table. On pasting the message archived to notepad the new line character \r\n is visible as square boxes. I tried replacing x'0d0a' with 'x'0a'.... the square box disappear but the line break is also gone ......
code used by me for conversion from mrm to fin for archiving without replace is -
DECLARE msgBitStream BLOB ASBITSTREAM(InputRoot.MRM ENCODING InputRoot.MQMD.Encoding CCSID InputRoot.MQMD.CodedCharSetId SET 'DU0A544078001' TYPE 'SWIFT_FIN_m' FORMAT 'SWIFT');
SET Message = CAST(msgBitStream AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
The message seems fine in table but, i can't use it to place a message again coz of junk square boxes.
Any help would be great.
TIA
Deepti |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 25, 2009 2:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The problem you have is that you saved the data as blob or clob into a table but did not save the CCSID that data was in. Your code shows that you have cast it back to char. That would be ccsid 1200 (broker default) yes?
So when you get it back from the DB what do you get? What CCSID is it saved in, in the DB?
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
deepti0313 |
Posted: Thu Jun 25, 2009 4:00 am Post subject: |
|
|
Newbie
Joined: 24 Jun 2009 Posts: 5
|
Hi ,
I'm casting the message above just to save in database.
DECLARE msgBitStream BLOB ASBITSTREAM(InputRoot.MRM ENCODING InputRoot.MQMD.Encoding CCSID InputRoot.MQMD.CodedCharSetId SET 'DU0A544078001' TYPE 'SWIFT_FIN_m' FORMAT 'SWIFT');
SET Message = CAST(msgBitStream AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
INSERT INTO Database.db2mqsi.SWIFTFIN_ARCHIVES(SENDER_MSG_REF, MASTER_REF, DISTRIBUTOR_ID, PROVIDER_ID, MSG_TYPE, MSG_FORMAT, MESSAGE)
VALUES (B2B_REF.Sender_Ref, B2B_REF.Master_Ref, B2B_REF.DistributorID, B2B_REF.ProviderID, B2B_REF.MessageType, 'FIN', Message);
The CCSID of Inputroot is 819.
Deepti |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|