Page 1 of 1

Output File Name - Dynamic

Posted: Sun Jun 01, 2008 9:27 pm
by yuva010
Hi,

I need to assign output file name at runtime(with date at postfix).
In this forum with 'search' I found solution as below -

Use of, ProcessName_#DSJobStartDate#_#DSJobStartTime#.txt
in Sequestial File stage.

It is applicable for DS Server.

Will the same be applicable for Parallel?
Or for Parallel, is there any simplified method?

Posted: Sun Jun 01, 2008 10:05 pm
by chulett
It works the same for PX AFAIK. Those, however, are job macros who's formats may not be exactly what you are looking for. You can always generate the date in your desired format and specifically pass it into the job in question as a job parameter. Those would be used in the same manner.

Or create a fixed filename in job and then 'rename' it via O/S commands to add the date/time stamp after job.

Posted: Mon Jun 02, 2008 2:06 am
by tsn
You can pass on the filename as a parameter to the job and get the run date and time you can format it according your format. concatenate those filename and run date and time, you can get the dynamic filename.

Posted: Mon Jun 02, 2008 9:49 am
by Krazykoolrohit
As Craig said, you can use a sequence to generate your timestamps and pass it into the job as job parameters.

In case you really want the exact job run time (in microseconds) you can again use the sequencer to rename the file after the job has completed (after capturing the actual job run time)