Page 1 of 1

concatenating the target file with the system date

Posted: Tue May 12, 2009 6:43 am
by santhoshrao.kuttuva
Hi all

i have a requirement as when my job gets run the target file which i specified should return with the current system date.

for eg., i have to get the target file name as " sample 20090405.txt"

Pleas eadvice ... Thanks in advance...

Posted: Tue May 12, 2009 6:56 am
by nagarjuna
Hi ,

Parameterise the target file name and get the value for that parameter from transformer or from OS .

Posted: Tue May 12, 2009 7:17 am
by dinakaran_s
Hi,

Use the Sequencer jobs to run the job and now you can use the below function to define as paramter for the job.

Ereplace(Oconv(@DATE,"D-YMD[4,2,2]"),'-','')

This function will return the system date without '-' (e.x. YYYYMMDD).

Let me know i foyu need anything more.

Posted: Tue May 12, 2009 7:43 am
by throbinson
Try using a DS Macro. If the format is acceptable it would be somewhat simpler then the other suggestions.
sample#DSJobStartDate#.txt

Posted: Tue May 12, 2009 7:47 am
by chulett
The other typical piece of advice is to write to a static filename and then rename it with the date/timestamp after job. A simple script/batch can do the trick.