‎2008 Nov 13 7:41 AM
hi all,
i need to send the output to application server, the data was going perfectly but the problem is ,the report if we run twice the output should not overwrite with the first executed run in app server.
if we run run more than once also it shoud not overwrite.
please help me
‎2008 Nov 13 7:52 AM
Hi,
If we download output to application server with the same file name earlier file will be overwritten.
To avoid this concatinate current date or time or some thing else to the file name.
I added date with the file name as it is executed on daily basis.
Thanks & Regards,
Sudheer
‎2008 Nov 13 10:45 AM
I would add further what sudheer said.
You cannot avoid overwriting if the files have same name.
Make some logic to change the file name everytime.....
‎2008 Nov 13 10:56 AM
Just append the current date and time at the end of the file name that you are writing to the app. server. This will write a unique file each time the report is run.
‎2008 Nov 13 11:03 AM
Hi,
If you want the contents of the file to be written to the same file without overwriting the existing data, then use the ... FOR APPENDING addition of the open dataset statement.
open dataset dsn ........ FOR APPENDING
Otherwise do as suggested above by adding a date time stamp to the filename.
regards,
Advait
‎2008 Nov 13 11:10 AM
Hi
as suggested by ravi
"Just append the current date and time at the end of the file name that you are writing to the app. server. This will write a unique file each time the report is run."
I feel this is the good option.
Regards,
Nagaraj