Attach YYYYMMDD to file name

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Attach YYYYMMDD to file name

Post 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.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post 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,
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

Thank you. I will pass the date as a parameter and handle this.
Post Reply