utl_file.open_file question to check if a file exists and is not empty
Hello,
I am trying to write a code where in 3 seperate files are created based on some parameter condition for the extract call.
Say the parameters are NULL, 'A' and 'B'.
When Null condition is passed to the extract call then it should create file A and B if records are found. If not it should create empty files.
It is possible that the parameter to the extract is just 'A' then it would create A with say non zero file and B with zero file.
Now when the extract is called with 'B' parameter and if the file A already exists and is not empty then I should not touch/overwrite it with empty records.
Is there any simple way that I can do this to check if a file exists and is non empty?
I am using
open_file
( gv_utl_file_path
,lv_file_name
,lv_file_handle
);
Please help.
Thanks