Clear file after successful job completion

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
sudarsan
Participant
Posts: 31
Joined: Fri Nov 17, 2006 4:14 am

Clear file after successful job completion

Post by sudarsan »

Hi,

In my project,I have a requirement like this.

Once the job finishes successfully, my input file needs to be cleared and it should be empty.

Can any one please help me on this.
Thank You,
Sudarsan AVS
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Just Create a file with the same name in the same path. You can do this with a routine, called in after job subroutine or a simple job which can be called after your original job completion.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Do your project use a phrase called "archiving" ?

Anyhow, if you want to clear, you can do a

Code: Select all

echo '' > fileName
sudarsan
Participant
Posts: 31
Joined: Fri Nov 17, 2006 4:14 am

Post by sudarsan »

Hi All,

Thanks all for your inputs....

It's got resolved...
Thank You,
Sudarsan AVS
Post Reply