Posted: Sat Apr 26, 2008 12:16 pm Post subject: Complex on-demand parsing
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
Hi, ALL
I have binary massage of following structure:
InFile
-----> Data Block (fixed length block of 8176 bytes)
---------> Record
-------------> Record Length (2 bytes)
-------------> Record Type (1 byte)
-------------> Choice of messages:
.......................type 1
.......................type 2
.............................
.......................type n
At the end of each block I have varable length buffer that complete block to 8176 bytes.
I can use only on demand parsing because I never know type of the next record.
When I use Data Block as message type and CWF and ondemand parsing in compute node, it working fine, but I can read only one Data Block.
I set InFile as Message type and TDS, where Data Block is fixed length fixed length it parse whole file.
Then I tried the following whith idea of on-demand parsing block by block:
Code:
SET Environment.Variables.DataBlockStream = InputRoot.MRM.DataBlock[I];
IF Environment.Variables.DataBlockStream IS NOT NULL THEN
CREATE LASTCHILD OF Environment.Variables.Data.Record
PARSE ( Environment.Variables.DataBlockStream
SET 'my message set'
TYPE 'MsgDataBlock'
FORMAT 'CWF'
ENCODING InputRoot.Properties.Encoding
CCSID InputRoot.Properties.CodedCharSetId);
END IF;
I got exception:
Code:
Text:CHARACTER:Attempt to copy an unresolved element
Insert
Type:INTEGER:15
Text:CHARACTER:8e6ee48
Insert
Type:INTEGER:5
Text:CHARACTER:(0x01000013):MsgRecord
Any idea???
Thanks. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel
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