write a procedure using utl_file and create the flat file with the required format that you would want

Sam