Problem in Parsing FlatFile

Hi,

I have a flatfile with structure as below

FH,PERF01,20060212,121535,01100
TR,ABC112222233333,20070518,AU,ABC12345678,999-999,
RD,ABC123456,20070518,50000,40000,40000,Transaction
RD,ABC123456,20070518,50000,40000,40000,Transaction
TR,ABC112222233333,20070518,AU,ABC12345678,999-999,
RD,ABC123456,20070518,50000,40000,40000,Transaction
RD,ABC123456,20070518,50000,40000,40000,Transaction
TR,ABC112222233333,20070518,AU,ABC12345678,999-999,
RD,ABC123456,20070518,50000,40000,40000,Transaction
RD,ABC123456,20070518,50000,40000,40000,Transaction
FT,34200,102602,34200000

I created Schema with 4 record definitions as FH,TR,RD,FT with delimeters as “newline” character for Record and “,” (coma) character for feild separation. It is extracting the values correclty but i have a problem here

when it is extracting the results it is extracting in following order

FH
TR
RD ( From here results are fetching inside RD)
–RD
–TR
–RD
–RD
–TR
–RD
–RD
FT

what should i need to do if i want the results outside from that first that RD

Please help me in this

Thanks in advance
Regards,
Jags

Jags,

Your schema should have been defined this way.

FH
–>TR (maxRepeat = unlimited)
—>RD ( maxRepeat =unlimited) --Create this RD record definition under the same level of TR hierarchy…This way TR,RD record will loop together and no issues in your parsing.
–>FT

HTH,
RMG

Hi RMG,

Thanks for your reply

I defined Schema as u said and given MaxRepeat to unlimited for both TR and RD now am getting the results as

FH
–TR
----TR[0]
–RD
----RD[0]
----RD[1]
------TR
----RD[2]
----RD[3]
-------TR

But i want to display my results in this way

FH
TR
RD
RD
TR
RD
RD
FT

Regards,
Jags…