Query on appending header to a flat file


I need to send a flat file to a partner, currently the data only contains the line level details.
Before sending to the partner I need to append header level information also.
Can you pls suggest how this can be done.