Page 1 of 1

How to dynamically name a file

Posted: Mon Nov 07, 2005 10:12 pm
by mchaves
Hi there,

I need to export data into a file that has to have this sort of name "dailyextract_yyyymmdd". How can I do this using a job?

I know that's something to be informed in the filename in the sequential file stage but I am not sure what.

Cheers

Posted: Mon Nov 07, 2005 11:20 pm
by kcbland
Use either a job parameter or a macro.

Posted: Mon Nov 07, 2005 11:39 pm
by mchaves
Mate,

I would like to use a macro. Could you post an example using macro?


Cheers

Posted: Mon Nov 07, 2005 11:48 pm
by kcbland
Use the Search facility, there's a lot of commentary on how to use one. For a date, check out macro DSJobStartTimestamp.

Posted: Mon Nov 07, 2005 11:51 pm
by mchaves
Got it!!!

The file name in the sequential file stage should look like :

#Source_Dir#\DailyBadDebt-#DSJobStartDate#.csv

Posted: Tue Nov 08, 2005 5:03 am
by ray.wurlod
Well done! And the work you expended in your research will benefit you by establishing the neuronal paths that help you to retain that knowledge.