Page 1 of 1

Attach YYYYMMDD to file name

Posted: Wed Dec 21, 2011 8:30 pm
by vskr72
I am creatting a file that is captuting BAD records on a daily basis. I need to name is as FileName_YYMMDD. I cannot use the After_Job routine because that is used for creating the Log file usign the DSJobReport. I used the built in marco like this FileName_#DSJobStartDate#. But thatis creationg it int he format of YYYY-MM-DD. Is there any other way otherthan using a command stage in a seq after this run? Thanks.

Posted: Wed Dec 21, 2011 8:40 pm
by pandeesh
yes.There are many ways.
One i used to use is unix solution.

Code: Select all

date +"%Y%m%d"
if you search here, there are many posts related to your requirement,

Posted: Wed Dec 21, 2011 8:55 pm
by chulett
As noted, there are several ways. You could look into passing that date stamp in as a job parameter and then leveraging the job parameter in the filename. You would set it upstream of the job, formatted however you like, and then pass it in. That way there's nothing needed 'after job'.

Posted: Wed Dec 21, 2011 11:53 pm
by vskr72
Thank you. I will pass the date as a parameter and handle this.