Posted: Sun Mar 03, 2013 7:41 am Post subject: Unable to Parse BLOB message
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;
Posted: Sun Mar 03, 2013 1:15 pm Post subject: Re: Unable to Parse BLOB message
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.
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