Header details and trailer validation for multi file

My requirement
header contains - business date
details contains - reccords
trailler contains - total no of records in detail.
1) header , detail , trailer separation with indicator filed ( conditional dml with indicator field )
2)Comparing header with business date , if not match fail. ( using lookup with date function)
3)comparing the record count of the details record with trailer if not match fail the graph.( please tell me this point)
input file -> reformat ( count 3) -> ....(can you plz fill this with examples )

Showing Answers 1 - 0 of 0 Answers

AKG

  • Aug 25th, 2011
 

Follow the steps:-
1) Define a param in graph and store the record count of the mutifile in it.
2) Create your graph like this.

file --> Filter having next_in_sequence() == 1 --> Gather --> dedup{} with keep first --> Out of tihs will be header.
file --> Filter having next_in_sequence() == 1 and to its deselect --> Gather --> dedup{} with keep lst--> Out of tihs will be trailer.

No you have separate out the header and trailer. You can now play with it anyway.

  Was this answer useful?  Yes

Rushieksh Deshapnde

  • Aug 30th, 2011
 

in Reformat have output index separate header,trailer and data based on it in transform 0 write xfr for matching business date using lookup expression for that use

  Was this answer useful?  Yes

raju

  • Oct 9th, 2012
 

input dataset---->dedup sort------> output file

In dedup sort component next_in_sequence > 1 then keep parameter make it as last. output port getting the trailer record, dedup port getting the detail records (if header, detail and trailer are in sequence)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions