Hi all,

I am using UTL_FILE module for some logging actions in a text file and it worked perfect for several years. However, for several days, the files are created with read-only option, so a second call to my logging function fails with SQL0443N (Routine SYSIBMADM.UTL_FILE.IMP_OPEN returned an error with diagnostic text UTL_FILE.INVALID_PATH).
My flow is:
- I want to have a different log file for each day, named mylog_day.log
- I call FOPEN with 'a' open-mode which should create the file when it does not exist or it will open it for append
- I write something in the file using PUT_LINE
- I close the file using FCLOSE

However, when the file does not exists, the file is created as read-only, so the next calls to my function will fail. Does anyone has an idea on this?

DB2 9.7 FP 10 on LUW
Windows 2008 SP2