2006 Jun 15 10:08 AM
Hi,
I have a program which downloads my file into application server. And my file name is something like "SUCC_PROD_CAT.DAT". This file is used by some other external application.
Even before the file gets downloaded fully, this external application is trying to access the file and this result in Partial file access or file with no records. This happens when the file size is large.
Inorder to aviod this problem, i am downloading my file in a temporary file name called "TS_PROD_CAT.DAT" and when the download is over, i am renaming it to "SUCC_PROD_CAT.DAT" using some command line operation. It gets renamed and after a couple of minutes, both the file Viz., TS_PROD_CAT.DAT and SUCC_PROD_CAT.DAT comes in the application server.
Even i have tried some other command line operation like Copying the File into SUCC_PROD_CAT.DAT and then deleting the temporary file TS_PROD_CAT.DAT. Even in this case, after a couple of minutes, the temporary file TS_PROD_CAT.DAT is getting restored.
Whether i need to do some other thing, in such a way that, temporary file should not get restored, after processing is over?
Thanks and Regards,
Vijay Govindarajan
2006 Jun 15 10:14 AM
Use FM
EPS_DELETE_FILE or CONVT_DELETE_FILES
to delete file or you can use
DELETE DATASET
statement.
rgds,
TM.
Please mark points if helpful.
2006 Jun 15 10:15 AM
You can declare 2 directories in your application server:
1. Tobeuploaded
2. Uploaded
Instead of deleting or renaming the file after uploading, move it to the directory uploaded. Sometimes the problem lies with authorization in the application server.
2006 Jun 15 10:18 AM
Hello Vijay,
As inidcated by you there is no reason for the file to reappear. Are you using shell cmds to copy the file? If yes then u can try to rename the file and move it into another directory say archive which can be deleted later on using another shell.