Hi
I am passing around file pointers to functions. I cant find the proper declarations for pointers and addressing in PL/SQL.
function write_file(
p_file_name varchar2,
p_file_ext varchar2,
p_file_ptr utl_file.file_type,
p_write_line varchar2)
return boolean is
begin
v_error_msg := 'Error -- while writing to ' || p_file_name || '.' || p_file_ext;
if utl_file.is_open(p_file_ptr) then
utl_file.putf(v_file_ptr, '%s\n', p_write_line);
utl_file.fflush(p_file_ptr);
end if;
return true;
end;
Calling function -- >
if ( v_file_name, 'abc', v_file_ptr, v_abc )
The first file call gives the correct output but subsequent function call by other files give error. Can anyone please explain why? Thanks
I am passing around file pointers to functions. I cant find the proper declarations for pointers and addressing in PL/SQL.
function write_file(
p_file_name varchar2,
p_file_ext varchar2,
p_file_ptr utl_file.file_type,
p_write_line varchar2)
return boolean is
begin
v_error_msg := 'Error -- while writing to ' || p_file_name || '.' || p_file_ext;
if utl_file.is_open(p_file_ptr) then
utl_file.putf(v_file_ptr, '%s\n', p_write_line);
utl_file.fflush(p_file_ptr);
end if;
return true;
end;
Calling function -- >
if ( v_file_name, 'abc', v_file_ptr, v_abc )
The first file call gives the correct output but subsequent function call by other files give error. Can anyone please explain why? Thanks