Home » SQL & PL/SQL » SQL & PL/SQL » how to clear the output data using utl_file?
how to clear the output data using utl_file? [message #639978] Tue, 21 July 2015 02:05 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

how to clear the output data using utl_file?
v_handle := utl_file.fopen(v_dirname,v_file_name,'w');
for loop
 ......
 ......
end loop;
utl_file.fclose(v_handle);


I will out put values in the file, then how to clean these values?
Re: how to clear the output data using utl_file? [message #639982 is a reply to message #639978] Tue, 21 July 2015 02:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

What do you mean by "clean" or "clear"?

Re: how to clear the output data using utl_file? [message #639983 is a reply to message #639982] Tue, 21 July 2015 02:19 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
What do you mean by "clean" or "clear"?

Thank you for early reply Michel , i need to clear(remove the unwanted data in the output).i think messages are overwriting in the output file
Re: how to clear the output data using utl_file? [message #639984 is a reply to message #639983] Tue, 21 July 2015 02:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

And what are the unwanted data?
And what is "output"? The file you opened?
And what did you mean by ".i think messages are overwriting in the output file"?

So explain in details what is your problem.
Show us your code, show us its execution, show us what is the problem.

[Updated on: Tue, 21 July 2015 02:22]

Report message to a moderator

Re: how to clear the output data using utl_file? [message #639986 is a reply to message #639984] Tue, 21 July 2015 02:25 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
And what are the unwanted data?

Means, in the output file showing succeeded data in the file
Quote:
And what is "output"? The file you opened?

we are trying to get data in the output file to show some data
Quote:
And what did you mean by ".i think messages are overwriting in the output file"?

same as 1 answer
Re: how to clear the output data using utl_file? [message #639987 is a reply to message #639986] Tue, 21 July 2015 02:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Quote:
Means, in the output file showing succeeded data in the file


This does not answer my question.

Quote:
same as 1 answer


Still don't understand.

Quote:
So explain in details what is your problem.
Show us your code, show us its execution, show us what is the problem.


Re: how to clear the output data using utl_file? [message #639989 is a reply to message #639987] Tue, 21 July 2015 03:09 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
I have used package , fetching the data using cursor for loop(if there is any error's occur's) , in the data loading there is no error's are there , messages are overwritten

And i will try to post more description on this
Re: how to clear the output data using utl_file? [message #639990 is a reply to message #639989] Tue, 21 July 2015 03:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

We are waiting for you...
How does it come that with more than 1000 posts you still don't know you have to show us what you do and get?

Re: how to clear the output data using utl_file? [message #640007 is a reply to message #639990] Tue, 21 July 2015 05:25 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
I have a log file that has a bunch of stuff in it that I don't need anymore. I want to clear the contents.
Is there a way to do it in one command without destroying the file to do it?
Re: how to clear the output data using utl_file? [message #640008 is a reply to message #640007] Tue, 21 July 2015 05:28 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

How is this related to Oracle?

Re: how to clear the output data using utl_file? [message #640009 is a reply to message #640008] Tue, 21 July 2015 05:42 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
How is this related to Oracle?

This is related to Oracle Apps Concurrent Program View Output File data, in this file report data is overwritten , i am calling packages and getting output files
Searched in the Google
$ cat /dev/null > t

How to use and where to use this $ cat /dev/null > t?
  sql_error=`grep "^ERROR" $tfile` 

    cat ${tfile} >>$OUTFILE
    cat ${tfile} >>$LOG
    
    mv $OUT_DIR/XXC_DATA.dat $OUTFILE

[Updated on: Tue, 21 July 2015 05:43]

Report message to a moderator

Re: how to clear the output data using utl_file? [message #640010 is a reply to message #640009] Tue, 21 July 2015 05:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

How these commands are Oracle ones?
How is this a SQL or PL/SQL question?

Re: how to clear the output data using utl_file? [message #640175 is a reply to message #640010] Thu, 23 July 2015 05:43 Go to previous message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
sorry!!

[Updated on: Fri, 24 July 2015 00:48]

Report message to a moderator

Previous Topic: Like in Order by
Next Topic: how to trapping error in SQL using SYS.DBMS_XMLGEN
Goto Forum:
  


Current Time: Fri Aug 07 14:15:03 CDT 2026