You can't use the unload-statement directly in
a stored procedure because it is not an SQL
statement.
So you might call a dbaccess batch-script which does
the unload thru 'system' inside the stored procedure.
However this is not very reliable way because of
the poor error handling capabilities of stored
procedures for such things.
I would recommend that you use a scripting language like
Perl or Python for doing this. These languages are both
available on NT and provide excellent features for
dealing with directories and files.
The stored procedure approach will also work, but maybe
not as reliable as needed.
Best regards
Eric
--
IT-Consulting Herber
WWW:
http://www.herber-consulting.de
Email:
eric@herber-consulting.de
***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************