PL/SQL host commands in a loop

From: Paul Smith <paul.smith_at_worldonline.nl>
Date: Tue, 27 Apr 1999 05:53:37 GMT
Message-ID: <37254c88.3046055_at_news.worldonline.nl>



[Quoted] I wondered if someone could point me in the right direction on this one? I'm trying to write a procedure that writes a set of directories to a set of text files (under Windows NT) using the following loop:

while direc <= max_direc loop
host ('dir /b c:\brieven\'||to_char(direc)||'
>c:\'||to_char(direc)||'.txt');

direc := direc + 1;
end loop;

I'm a bit puzzeled as to why the host command fails within the loop but works perfectly outside it or in a SQL file. The type of loop construciton seems to be immaterial and the same thing happens if you put an alert after the host call to give it time to execute.

Actually, the whole issue of getting data between the host and PL/SQL seems problematic. Are there any good resources (books, web sites) I can go to in order to get some answers? Received on Tue Apr 27 1999 - 07:53:37 CEST

Original text of this message