Page 1 of 1

Posted: Wed May 14, 2008 3:30 pm
by chulett
Two ways.

1) Pass in the value to use as a Job Parameter and then use that parameter in the output filename.

2) Create a fixed filename in the job and then 'after job' rename / timestamp the file via your O/S, either directly or scripted.

Posted: Wed May 14, 2008 3:30 pm
by vivekgadwal
Jessie,

If the format of the date is not an issue, then you can achieve this by using the macro DSJobStartDate. This can be used right where you provide the name for the file (inside the Seq File stage). EX: ...Path.../DummyFile_#DSJobStartDate#.csv would generate a file in the path named DummyFile_05-14-2008.csv (I am not sure how it generates the date, but...you got the idea :wink: )

If format does matter, the way I did would be to handle it in an after job sub-routine. Invoke an ExecSh and in that you can rename the file that is being generated (search online for syntax and options). Assuming that you need current date, inside the routine, manipulate the Current Date or the date you need (passed as a parameter/argument) using OConv function and store it in a variable. Then you would use ExecSh and rename the file and concatenate the manipulated date to the name. I have actually implemented it and this is an idea I got from one of the earlier posts written by "DSGuru2B". So, you also might want to search for earlier posts for some more input.

Let us know how it goes.