UTL_FILE READ TAKING TIME [message #587302] |
Fri, 14 June 2013 01:23  |
 |
umeshchandraseth
Messages: 60 Registered: June 2011 Location: new delhi
|
Member |
|
|
Hi All,
Need urgent help on below process.
CREATE OR REPLACE PROCEDURE FILE_CHECK AS
V_LOOP_TILL_SUCCESS1 VARCHAR2(1) := 'N';
V_LOOP_TILL_SUCCESS VARCHAR2(1) := 'N';
VINHANDLE UTL_FILE.FILE_TYPE;
MSTATE VARCHAR2(1000);
MCODE NUMBER;
FFDATE DATE;
VNEWLINE VARCHAR2(250);
CF NUMBER :=1;
BEGIN
LOOP
BEGIN
VINHANDLE := UTL_FILE.FOPEN('INPUT_DIR', 'SMS.TXT', 'R');
IF UTL_FILE.IS_OPEN(VINHANDLE) THEN
INSERT INTO TB_FILE VALUES('SMS.TXT',SYSDATE,'Y');
ELSE
INSERT INTO TB_FILE VALUES('SMS.TXT',SYSDATE,'N');
END IF;
SELECT STATUS INTO V_LOOP_TILL_SUCCESS1 FROM TB_FILE;
IF V_LOOP_TILL_SUCCESS1 = 'Y' THEN
V_LOOP_TILL_SUCCESS :='Y';
END IF;
EXIT WHEN V_LOOP_TILL_SUCCESS = 'Y';
END;
END LOOP;
basically this procedure check if file present then execute next block else procedure keep running in loop
exit when file is available on location.
This procedure pick SMS.TXT file from location which is ('INPUT_DIR')
when i am test this proceudre this procedure take very much time at the line of
VINHANDLE := UTL_FILE.FOPEN('INPUT_DIR', 'SMS.TXT', 'R');
Thanks.
|
|
|
|
|
|
Re: UTL_FILE READ TAKING TIME [message #587308 is a reply to message #587302] |
Fri, 14 June 2013 01:32   |
 |
Michel Cadot
Messages: 68764 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
From your previous topics:
Michel Cadot wrote on Thu, 26 April 2012 11:23Michel Cadot wrote on Thu, 26 April 2012 08:571/ Do NOT post in UPPER case
2/ Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
3/ Also always post your Oracle version, with 4 decimals.
If you make no effort to post correctly I don't see any reason to help you.
Regards
Michel
cookiemonster wrote on Fri, 11 May 2012 14:18You've been asked read and follow How to use [code] tags and make your code easier to read? before. Please do so...
BlackSwan wrote on Mon, 21 May 2012 08:03Please read and follow the forum guidelines, to enable us to help you:
http://www.orafaq.com/forum/t/88153/0/
...
Michel Cadot wrote on Sun, 17 March 2013 20:13...
With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
...
|
|
|
Re: UTL_FILE READ TAKING TIME [message #587310 is a reply to message #587307] |
Fri, 14 June 2013 01:33   |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
umeshchandraseth wrote on Fri, 14 June 2013 07:31thanks for feedback mr Michel.
can you help on this?
I would almost guarantee that Michel can help on this, however, I can also almost guarantee that he won't until you show that you have at least tried to follow the guidelines (which at this point, you clearly haven't)
|
|
|
|
|
|
|
|
|
|
|
Re: UTL_FILE READ TAKING TIME [message #587325 is a reply to message #587321] |
Fri, 14 June 2013 02:33   |
 |
Michel Cadot
Messages: 68764 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
umeshchandraseth wrote on Fri, 14 June 2013 09:26don't try to teach me.if you can help then please help.
Why should I when you are so reluctant to follow the guide, post how we requested and do feedback and thank people that help you.
And if you don't want to learn you are not in the correct forum.
Regards
Michel
[Updated on: Fri, 14 June 2013 02:52] Report message to a moderator
|
|
|
|
Re: UTL_FILE READ TAKING TIME [message #587327 is a reply to message #587321] |
Fri, 14 June 2013 02:35   |
cookiemonster
Messages: 13967 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Code tags exist to make code easier to read. Pretty much every internet oracle forum has them and expects posters to use them.
Using them makes your code easier to follow for everyone, and so makes people more willing to read and understand the code and so help you.
So when a moderator of the site (Michel, pabolee and myself) ask you to use code tags it is a good idea to do so.
Because if you're not interested in spending 30 seconds to make your code easier to follow, why should anyone spend time helping you?
|
|
|
|
|
Re: UTL_FILE READ TAKING TIME [message #587336 is a reply to message #587329] |
Fri, 14 June 2013 03:01  |
cookiemonster
Messages: 13967 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I explain to you why we ask you to use code tags - so instead you post the code as a file.
The link to the page that explains code tags (in simple terms, with pictures) is posted multiple times above. Click on it. read what it says, follow what it says.
|
|
|