Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Urgent Help Plz! DB2 FILE OPERATION!

Hi all
I would like to request for a help here.I am working with db2 databases

and currently been assigned a job to migrate from oracle to Db2.I have

been struggling with a problem and being struck at that point.Here I have

to read data from a temporary table to a delimited text file.In oracle

there is a file utility package (f_open,f_write,f_close)to perform this

operation but there is no such equivalent in db2.There is ofcourse an

export utility which could be used for writing to a del file but I have

been asked to deal only with a SQL interface that is through SQL Stored

procedures.One option I came across was to use an external UDF built

using C specfically using put_line.But when i created this function in

the sqllib directory and tried to compile it did.But on execution it

couldnt access the path.I am very much struck now and find noways to move

ahead.I find no clue to where to store that UDF or is there any other way

I can access this problem.Any kind of help/suggestions would be sincerely

appreciated.

THANKS A LOTT
[1192 byte] By [kingp] at [2007-11-11 9:59:49]
# 1 Re: Urgent Help Plz! DB2 FILE OPERATION!
If the error when executing is "access error" it maybe because of the using of the file by another programme like your db itself .. if your file is over network check to make the path with "/" not "\" .
Amahdy at 2007-11-11 23:43:31 >
# 2 Re: Urgent Help Plz! DB2 FILE OPERATION!
thanks Amahdy for your prompt reply... appreciate your suggestion...I tried the solution...but unfortunately doesnt hold good. ...jus wondering if there is any way any command can be used through stored procedure which could export...if you can thrown any light on this wud be sincerely appreciated...
Thanks
kingp at 2007-11-11 23:44:31 >