Posted: Fri Apr 11, 2008 7:48 am Post subject: Message Set - Help
Voyager
Joined: 05 Aug 2002 Posts: 79 Location: US
Hi,
I am using WMB 5 in my project and I have flat file to be parsed. The flat file is of fixed width format.
The file organisation is kind of complex. The first two characters of every record contain either 00 or 01 which indicate the event type. Every event can have one or more table type records which have different structures.
On a High-level, the file is something like this
Event0
FileType1
FileType2
FileType3
etc
Event1
FileType4
FileType5
...
All the Event records are identified by 00 in the first two characters and have similar structure (Event0&Event1 are similar in structure)
A record can be identified as a filetype by 01 being present in the first two characters but the type of file is identified by a 3 character value in the 8th position in 01 lines.
Any pointers on how to parse these type of records?
Thanks in Advance!!!
My standard reply:
- Post an example message
- Post the message tree structure that you want the TDS parser to produce
- Include details of repeating and optional structures
Quote:
the type of file is identified by a 3 character value in the 8th position in 01 lines.
I hope that positions 1..7 can be parsed without knowledge of that 3-character value. If not, we'll have to resort to data patterns.
Joined: 19 Mar 2008 Posts: 22 Location: Madrid, España
First probably you must decide which FileType you are parsing:
IF (SUBSTRING(resp FROM 8 FOR 3) =
CAST (000 AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Enconding) THEN
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = 'MSGSET';
SET OutputRoot.Properties.MessageType= 'MSGIDFileType1';
ELSE
... ...
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = 'MSGSET';
SET OutputRoot.Properties.MessageType= 'MSGIDFileTypeN';
END IF;
servi: It may be possible to do what vadivel requires using TDS and the Tagged Fixed Length format. Let's wait until vadivel posts all the information before proposing a solution.
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