Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type tree reading

Status
Not open for further replies.

venkatpavan

Programmer
Feb 18, 2006
42
0
6
SG
Hi,

I'm trying to read the file which has multiple MQheader + messages in a file(doesn't have any terminators),Could someone help me how could I read each message and process it,

File looks like:

MD......MQSTR...Message1MD......MQSTR...Message2MD......MQSTR...Message3MD......MQSTR...Message4MD......MQSTR...Message5

I would like to read this file and process each message separately(MD......MQSTR...Message).

Thanks in advance.

Mapper
 
lack of terminators will make it challenging. Things that would help would be initiators, delimiters and fixed lengths. Even with those you may have issues. Where does segment end if it's defined as text and you can't define a way for the map to identify the end of data. Post fix delimiters might help, Component rules may als help but depending on your data....
 
Looks like your file is one whole continuous record. One possible way is to UNSTRING your file delimited by "MD" and this will create a sequential file that you can use for your tree. Or is there a way that you could use "MD" as your terminator?
 
Unstringing might work if you don't have to worry about a stray "MD" (or other delimiting value) impacting the process.

definitely worth testing...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top