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 » Unable to Parse BLOB message

Post new topic  Reply to topic
 Unable to Parse BLOB message « View previous topic :: View next topic » 
Author Message
BinduSree
PostPosted: Sun Mar 03, 2013 7:41 am    Post subject: Unable to Parse BLOB message Reply with quote

Newbie

Joined: 26 Feb 2013
Posts: 6

Hello, I have a BLOB message as input and kept the parser as BLOB. But When i debug I dont see my message. Actually my req is to add carriage return after every 1064 bits(Data Segement in an IDOC)

Here is my code.

DECLARE inputMsg REFERENCE TO InputBody.BLOB.BLOB;
DECLARE outputMsg CHARACTER 'EDI_DC';
DECLARE outputMsg1 CHARACTER;
DECLARE subMessage CHARACTER;
DECLARE pointerPosition INTEGER 1;
DECLARE CRSTR CHARACTER;
DECLARE LFSTR CHARACTER;
DECLARE LENGTH INTEGER inputMsg;
DECLARE i INTEGER 1;
SET CRSTR = CAST(x'0D' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId) ;
SET LFSTR = CAST(x'0A' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId) ;

SET outputMsg = SUBSTRING(inputMsg FROM pointerPosition FOR 524) || CRSTR || LFSTR;
SET pointerPosition = pointerPosition + 524;

SET outputMsg1 = SUBSTRING(inputMsg FROM pointerPosition FOR 1588) || CRSTR || LFSTR;
IF (outputMsg1 IS NOT NULL) THEN

SET outputMsg1 = outputMsg || outputMsg1 || CRSTR || LFSTR;
SET outputMsg1 = outputMsg1 || SUBSTRING(inputMsg FROM pointerPosition FOR 1064) || CRSTR || LFSTR;
SET pointerPosition = pointerPosition + 1064;

SET i = i + 1;
--SET outputMsg = outputMsg || SUBSTRING(inputMsg FROM pointerPosition FOR 1064) || CRSTR || LFSTR;
--SET pointerPosition = pointerPosition + 1064;
END IF;
RETURN TRUE;
END;


When i Debug I get the below in the BLOB tree.

BLOB:BLOB:[B@5f965f96


My actual message is:

00000000 EDI_DC40 4000000000256397614731
00000032 3012 FIDCCP01
00000064
00000096 FIDCC1
00000128 FIDCC1SAPF08 LS
00000160 ESAPF08400
00000192
00000224
00000256 A000000054LS SEN_P
00000288
00000320
00000352 201302
00000384 28172959
00000416
00000448
00000480
00000512 E2FIKPF002
00000544 4000000000256397614000
00000576 001000000012516 51000872572012R
00000608 E20120308201203080320120329ERACS
00000640 AG MIRA 02000
00000672 00282 201203281715311123
00000704 EUR 1.00000 RMRPRMRP 511
00000736 88047642012 EUR USD
00000768 1.34470 2 2 30
00000800 ESAPP12400 2516
00000832
00000864 000 0000 .........................................................................................................................................................................

Could anyone tel me where did i go wrong.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Mar 03, 2013 7:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You went wrong by even bothering to write any code at all.

Create two message models. one that has a single record and the second that has a repeating record that is fixed length and delimited by a CR/LF.

And by failing to search here for previous answers.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Mar 03, 2013 1:15 pm    Post subject: Re: Unable to Parse BLOB message Reply with quote

Grand High Poobah

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

BinduSree wrote:
Could anyone tel me where did i go wrong.


Aside from using the debugger, the other thing you did wrong was double posting. This is the same issue and resolution you were given here.
_________________
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 » Unable to Parse BLOB message
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.