Delete the Source File in a Job after run

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
asvictor
Participant
Posts: 31
Joined: Tue Sep 02, 2003 3:06 am
Location: Singapore
Contact:

Delete the Source File in a Job after run

Post by asvictor »

Hi,

I need to delete the data in the Staging source Table when the Job is Completed running. Is there any method to delete in the Job itself? can we do in the Plug ins or have to write a after job subroutine?

Cheers,

Victor
Victor Auxilium
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Only method is after-job routine. I wouldn't even do it that way. I would separate that functionality from the job and put it in a stand alone job with a command stage or BATCH logic to issue the appropriate sql script. What a pain in the rear every time you run that job in development to have it wipe out your source data.


...mutters to himself about modularity... :cry:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As usual agreeing with Ken.

Another advantage of separating deletion of the staging data from the job that uses them is that you get easier restartability in the event that the job fails to complete successfully.

Modularity, I guess. :)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raju_chvr
Premium Member
Premium Member
Posts: 165
Joined: Sat Sep 27, 2003 9:19 am
Location: USA

Re: Delete the Source File in a Job after run

Post by raju_chvr »

Also again Modularity. If your jobs are not documented well the person who comes after you will have to wonder which process is deleting the data. In this case all he/she needs to do is look at the second job which deletes the source data and will appreciate your Development standards :)
Post Reply