1) Do you have only 1 header and 1 footer pour all the file (ex : for 500 rows of data), or do you have 1 header and 1 footer for "blocs of data" ? Can you provide us an exemple with more than 1 row of data ?
2) where do the header and footer data come from ? I assume they come from specific SQL statement on your source table ?
for 1 and 3 you can use the LKM Sql as source to select your header and footer values from dual and use to write the line into your file.
Alternatively check out SQLUnload ODI Tool., same principle as above.
You'll have to open the IKM "IKM SQL to File Append"
Then click on the "details" tab, then click on the first button to add a new row.
Then you double click on this new row and write the correct SQL statement.