generating an xml file with required timestamp

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

generating an xml file with required timestamp

Post by sravanthi »

Hi

I have to generate an xml file with name_yyddmmDDMMSS.xml .

I am presently doing this through the unix script.I have also tried to use name_#dsjobTimestamp#.xml but it will not genarate in the above format.

Is there any possibility to specify the timstamp format in the job level itself?

thanks in advance
sravanthi
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

There is a way to do this.

You have to write a after job routine. The XML stage will have names like Job1XMLOut.xml in the XML stage.

the in the after job routine call commond line as follows:

Code: Select all

mv Job1XMLOut.xml Job1XMLOut_`date +"%y%m%d%H%M%s"`.xml
It may require some mino changes depending on the unix u r using.
Regards,
S. Kirtikumar.
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

You will have to use the ExecSH to run the unix command as after job routine.
Regards,
S. Kirtikumar.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What is the output you got with 'name_#dsjobTimestamp#.xml'. If format is not as expected, try to user Iconv/Oconv to change it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply