The header or footer can be created in the target using the property "append if exist"
Depending on what you need in the header / footer and target data create our mapping. Example 3 flows of data
Source -> transformation for header -> target.txt
Source -> transformation for target data -> target.txt
Source -> transformation for footer -> target.text
Set the target load order as above order and set the target file names as same
Go to session and in properties set file property to APPEND IF EXISTS.
This will append the data in the order specified in target with header, footer