Flat File Schema Urgent help required

Hi All,

we need to parse the following flat file structure : 

H - Header ( Occurrence =1 only) 
E - Edit   ( Occurrence =1 or More ) 
D - Delete ( Occurrence =1 only or more ) 
T - Trailer ( Occurrence =1 only) 

E and D records can occur anywhere in between H and T , ex :- 2 E records then 3 D records , 4 E records etc.

All the records(H,E,D,T) has different subfields and each record has some fixed length.

:::::::::::::FLAT FILE SAMPLE :::::::::

H07-JUN-200304:0000043
D0623124960
D0623124962
D0623124963
ECTRN0612824212000000.00000000.00000000.00000000.00000000.00
EHTRR0411097307000000.00000000.00000000.00000000.00000000.00
EFTRR0561277443000000.00000000.00000000.00000000.00000000.00
EATRR0467218818032004.88222343.63673225.88222349.25673512.00
EATRR0610286970003008.34238702.88678375.88238706.75678412.50
EATRR0622276860000005.55238706.75678412.50238711.75678414.25
ENTRR0622370429000002.89245364.63126609.00245367.38126609.88
T000009650000000000000109

Please suggest how we can parse this flat file .

Thanks in advance

Hi all,

I am able to parse the flat file but not with the required output,
lets take Mr.Rajiv’s example, after parsing I am getting the output as:
H, D records are inside the E, E records are inside the D, T.
At this point, I even suspect that there might be a issue with the Schema…
any suggestions…

Hi Rajiv,

      As per my understanding I have created the schema. Have a look on the attachment. Hope it should addtess your needs. 

Thanks,


wmuserquery.zip (2.4 k)