What OS version/release? What languages are you willing to use? What DB2 options do you have installed?
Answers to your question can be very different for different ways you might answers those questions. You need to give us something to work with; otherwise a correct answer can be “Start writing code to emit XML files. You can do it just like you would write any streamfile if that’s how you choose to do it.”
I have example code to show how to create XML stream files from DB/400 files. The output is placed into a folder in your AS/400′s IFS, from where you can ftp it to its destination.
I’m not best placed to advise you on the ftp side! But if you would like the sample code to create the XML, write to me at firstname.lastname@example.org