Page 1 of 1

Renaming file in Unix at the end of a job sequence?

Posted: Wed May 25, 2005 10:05 am
by cbres00
I create a flat file in one of my job sequences. I'd like to archive it with a date and timestamp at the end of my job sequence.

Any elegant/simple ways to do this?

TIA,
Cathy

Posted: Wed May 25, 2005 10:09 am
by Sainath.Srinivasan
Use mv command and supply the target file name as mixed parameters.

Re: Renaming file in Unix at the end of a job sequence?

Posted: Wed May 25, 2005 10:13 am
by ram1899
Create a sh script and call it as after Job routine please check box after Job Run Sucessfully Bu doing this it will only run if the run sucessfully


cbres00 wrote:I create a flat file in one of my job sequences. I'd like to archive it with a date and timestamp at the end of my job sequence.

Any elegant/simple ways to do this?

TIA,
Cathy

Posted: Wed May 25, 2005 10:24 am
by cbres00
How would I call a shell script from a job seq? This will open up a whole world of flexibility for me if I knew how to do it!

Regards and thanks,
Cathy

Posted: Wed May 25, 2005 10:28 am
by amsh76
If you have to do it as after job, then its only possible if you include that in very last job of your sequence or else you can always use execute command stage in your sequencer for executing unix command.

Posted: Wed May 25, 2005 9:18 pm
by ray.wurlod
Call a shell script from an after-stage subroutine or after-job subroutine. Specify ExecSH as the subroutine, and add the pathname of the shell script plus any command line arguments (which can be job parameter references) in the Input Value field.

Or you can write your own before/after subroutine - perhaps a clone of ExecSH but with different logging characteristics - and invoke that instead.