Error sqlloader

Hello I am having a problem with a script. I try to run a store procedure from unix with sqlldr and shows me the following error.

begin
*
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "RNP.SP_ARCH_SALIDA", line 64
ORA-06512: at line 2

The sp creates a data file with a table. Run the script as a parameter by sending the directory where you saved the file. If I taste the TOAD enviendole sp from the directory as a parameter showing the script, works and creates the file

Script:

work=/work/input/telefonia
BASE=rnp/rnp@sinti9d

. profile.sinti9d

sqlplus -s $BASE <<EOF
set serveroutput on
spool salida.txt
begin
sp_arch_salida('/work/input/telefonia/prueba');
end;
/
spool off
EOF

From already thank you very much

Hi,
the stored procedure throws an user-defined exception. Those are often used to indicate a logical error.
Have a look at the procedure sp_arch_salida and you'll find a RAISE statment near line 64 and some kind of condition when its executed (maybe some exception handler or an IF -block).