‎2010 Sep 03 1:34 PM
Hi,
I have a functionality in which I am reading some files from application server, processing it and then downloading files with
data in it. The download filename is of format file_new_<timestamp>.
Now the problem is, due to fast processing the timestamp is not changing and thus instead of multiple files generating on application server only one file is generating.
A temporary solution is to use WAIT UP TO ... but this will seriously hit my programs performance..as the number of files are huge.
Thanks in advance.
‎2010 Sep 03 2:45 PM
While getting timestamp use field of type TIMESTAMPL not TIMESTAMP. It is accurate to nano seconds so you will not have any issues with unique name.
Regards
Marcin
‎2010 Sep 03 4:01 PM
Hi Marcin,
Thanks for the reply... my requirement is that the filename should contain only TIMESTAMP and not TIMESTAMPL. I have already considered this but it is not applicable in my case ..
‎2010 Sep 06 9:06 AM
That's seems troublesome then. What you can do instead is to consider different directories as destination place. As the name wouldn't be unique for each second you could generate as many subcatalogs as files generated in one second. Tehn go back to the first and upload in the same sequence all the rest.
This would probalby produce thousands of dirs but as long as you have some automation process for downloading them back on presentation server this should not be a problem. I know it's a dirty way but the only one which comes to my mind. The best would be adjusting the requirements to include TIMESTAMPL in the name though.
Regards
Marcin
‎2010 Sep 06 11:55 AM
Hi Macin,
I agree with you ... that sure is a dirty way.. anyways thanks for the reply. Will lookout for more solutions.
‎2010 Sep 06 1:06 PM
It's not the best solution ever but...
Getting the timestamp at the beggining of the program and adding 1 to it for each new file created??
The timestamp won't be real but it seems it can't be real and unique at the same time.
Regards
Rafa
‎2012 Apr 06 11:58 AM
Use the function module OCS_GET_FILE_INFO . It returns the time stamp of each and every file in the given path
‎2012 Apr 06 2:12 PM
You have files being stored more frequently the one per second? Amazing, but possible I suppose. A simple question....you are issuing "get time" command just before constructing each new time stamp, aren't you?