UTL_FILE package alow you to read and write to a file, it's best if you look in Oracle doc's.