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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing ETD with multiple Segments

Status
Not open for further replies.

brien

Programmer
Jan 2, 2003
5
BE
Hi

I need some help in parsing a java ETD with multiple
segments. some segments/fileds are optional and repeating
also. I need to know what should I use in this case
Global or Local delimiters ?

In case of Global delimiters while setting different levels
how should be the sequence of delimiters ? That is which
one should come first, end of record or the field one ?
In my case even the segment might contain sub segments and
fileds.

The ETD structure looks like this:-
Root
Header (fixed width)
Element1 (All Elements/segments are delimited)
Field1
Field2
Field3
Element2
Field1
Field2
Field3
Field4
Element2A
Field1
Field2
Element..n
Field1
Field...n

Any example/help will be greatly
appreciated. Thanks.
 
When you define delimiters you do it at 'levels'. First level is highest. i.e. in your example, level 1 is Header/Element1/Element2 etc.
Next level will be field.

This applies to global delimiters but you can override this at the local element level. See bottom of properties and change to 'fixed' rather than 'delimited'. Specify the length in this case.

You will be able to define an ETD to parse your example.
 
Hi Brien,

Looks like I too have the same kind of requirement. Did you find any answer for the problem you had posted, Kindly send to me..(vijayonstar@yahoo.com)

I have another question on the similar line:-

I am trying to build an ETD which contains the fields of type fixed length and delimiter based.

I want to fill a field based on the criteria of delimeter presedence.
The inbound data can have varying delimiters based on the configuration like !,@,#,$..

I would like to add a few delimiters in specified priority to the 'fieldX' in the ETD.
1. @, 2. #, 3. $

The 'fieldX' in the ETD should look for the delimiter @ at first and if not found, look for # and if not found look for $ in the mentioned precendence. What is the best way to achieve this functionality?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top