Dateformat

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

Dateformat

Post by parvathi »

Hi all,
I have requirement as follows
In datastage I need to pass the creationdate as a parameter to the nameof the file.
the parameter is
#ROOT#/DD_SAP_#DSJobStartTimestamp#_1.CSV

AFTER the job is run the name of file would like this
DD_SAP_2006-10-17 11:12:10_1.CSV IN UNIX SERVER

But I want to have the name of the file to look like this

DD_SAP_20061017111210_1.CSV


Is there anymethod i can modifythe dateformat during the runtime

can anybody suggest me
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Other way is, you can produce the file as DD_SAP_1.CSV and you can use

Code: Select all

mv #ROOT#/DD_SAP_1.CSV #ROOT#/DD_SAP_`date +"%Y%m%d%H%M%S"`_1.CSV
in after job subroutine in ExecSH.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply