Page 1 of 1

Creation of Sequential file with timestamp appended

Posted: Thu Feb 12, 2004 3:15 am
by Sreenivasulu
Hi All,

I want to create a sequential file whose name would be dynamic. For example i want to create a sequential file which would have the current system timestamp appended to the file. Anyone having any ideas on this

:)

Posted: Thu Feb 12, 2004 5:40 am
by roy
Hi,
use parameters in the file's path tab.
i.e. #DIR_PARAM#/file_name#TMSP_PARAM#.dat
or if you prefer get the parameter to hold the full path or file name
yes this means you need to have it in a paramter prior to running that job.

IHTH,

Posted: Thu Feb 12, 2004 7:44 am
by raju_chvr
<FILENAME>_#DSJobStartDate#

this should also workj if you are not creating the file twice on the same day ....

Posted: Thu Feb 12, 2004 2:55 pm
by jreddy
There is a DSJobStartTimeStamp macro too available if you need to capture timestamp and still have no problem running it more than once a day.

Posted: Tue Feb 24, 2004 4:06 pm
by raju_chvr
I tried it in Windows environment. It aborted as it can't create a file with with ':' in it and the 'DSJobStartTimeStamp' comes back with a value which has ':' in it ..

Posted: Tue Feb 24, 2004 4:48 pm
by ogmios
raju_chvr wrote:I tried it in Windows environment. It aborted as it can't create a file with with ':' in it and the 'DSJobStartTimeStamp' comes back with a value which has ':' in it ..
Change the ':' to '_' with ereplace afterwards. Put the calculation of the date/time in a controlling job passing the value as a parameter.

Ogmios