Write file with multiple record types
We are reading data from ATP tables and need to a write the file for target system which has multiple record types.
Header, field1, field 2, field 3
Line1, field4, field5, field6
Line2, field4, field5, field6
The data in the ATP tables is detail and not segregated at header level. What is the best way to approach this ?