You do have a package specification for this body? You don't show any
code to create one.
Modifying your code slightly (to provide a package spec and use
Windows rather than Linux/UNIX) produces this:
SQL> CREATE OR REPLACE DIRECTORY test_temp AS 'c:\test_temp';
Directory created.
SQL>
SQL> create or replace PACKAGE pkg_test AS
2
3 PROCEDURE dump_test(Filename IN VARCHAR2);
4
5 END pkg_test;
6 /
Package created.
SQL>
SQL> create or replace PACKAGE BODY pkg_test AS
2
3 DUMP_DIR CONSTANT VARCHAR2(30) := 'TEST_TEMP';
4
5 PROCEDURE dump_test(Filename IN VARCHAR2) IS
6 c sys_refcursor;
7 fout utl_file.file_type;
8
9 BEGIN
10
11
12 ------
13 -----
14 ----
15 fout := utl_file.fopen(DUMP_DIR, Filename, 'w',
32767);
16 ---
17 ----
18 END dump_test;
19
20 END pkg_test;
21 /
Package body created.
SQL>
SQL> exec pkg_test.dump_test('yarg')
PL/SQL procedure successfully completed.
SQL> $ls -l c:\test_temp
total 0
-rw-rw-rw- 1 user group 0 Jan 6 11:27 yarg
SQL>
I can't get it to fail. You need to provide more information before
anyone can see what you're doing incorrectly.
David Fitzjarrell