Page 1 of 1

Date after File Name

Posted: Fri Feb 09, 2007 5:08 am
by madhav_1981
Hi ALL,
I am rejecting the data in a sequential file. My requirement goes like this.

I need to append the date at the end of the file name. so when users wish they can able to see the rejected data on a particular day.

Please let me know how to do that?

Thanks,
Madhavan.S

The job is invoked via a shell script and running on OS: UNIX.

Posted: Fri Feb 09, 2007 5:22 am
by balajisr
Have a job parameter for date and append the file name with the job parameter.

Code: Select all

FileName_#date#
where date is the job parameter.

Posted: Fri Feb 09, 2007 7:54 am
by chulett
That's certainly the easiest way, if you can pass the date in. You can also (script or routine) write to a fixed name and rename it 'after job'.

Posted: Fri Feb 09, 2007 8:03 am
by DSguru2B
Somthing like

Code: Select all

mv myfixednamefile.txt filewithdateandtime`date +"%Y%m%d_%H%M%S"`.txt 

Date after File Name

Posted: Wed Feb 28, 2007 2:25 pm
by tmcnicol
This can be done from the Sequencer in the parameters section. This statement will format a date as such: 'FILENAME'_YYYYMMDD.TXT

"FILENAME" :"_": Convert("-","", DSJobStartDate):".":".txt"