Email The Output of A Concurrent Program Using UTL - MAIL
Email The Output of A Concurrent Program Using UTL - MAIL
1. Write a procedure that will submit the concurrent program whose output has to be sent as an Email and once the
program completes, send the output as Email using UTL_MAIL.send_attach_varchar2.
2. Register this procedure as a concurrent program so that this program can be run from Oracle Applications which
will email a concurrent program’s output.
fnd_file.put_line (fnd_file.LOG,
'Conc Prog ID:' || v_concurrent_program_id);
fnd_file.put_line (fnd_file.LOG,
'Application ID: ' || v_application_id);
fnd_file.put_line (fnd_file.LOG,
'Conc Prog Short Name: ' || v_conc_prog_short_name);
fnd_file.put_line (
fnd_file.LOG,
'Application Short Name:' || v_conc_prog_appl_short_name);
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line (fnd_file.LOG, 'Error: ' || SQLERRM);
END;
IF UTL_FILE.is_open (fhandle)
THEN
DBMS_OUTPUT.put_line ('File read open');
ELSE
DBMS_OUTPUT.put_line ('File read not open');
END IF;
UTL_FILE.fclose (fhandle);