×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Parsing ETD with multiple Segments

Parsing ETD with multiple Segments

Parsing ETD with multiple Segments

(OP)
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.                      

RE: Parsing ETD with multiple Segments

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.

RE: Parsing ETD with multiple Segments

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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close