before job routine & after job routine

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
chvenkat.v
Participant
Posts: 94
Joined: Fri Dec 14, 2007 3:22 am

before job routine & after job routine

Post by chvenkat.v »

Hi


What is the difference b/w before & after job routines in Datastage? And when we will use those routines in datastage jobs (i.e. tell me situations when we are using them in datastage jobs and why)

thnks
venkat
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Before job routines get executed before a job starts and an after-job subroutine gets executed after a job successfully completes. If you have actions that need to be performed at these times then you can code your routines to do this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Before/after routines are executed once (maximum) per job run.

Transform functions are executed once per (output) row.

One example of an after-job subroutine is to archive/rename the file that has just been processed by the job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
John Smith
Charter Member
Charter Member
Posts: 193
Joined: Tue Sep 05, 2006 8:01 pm
Location: Australia

Re: before job routine & after job routine

Post by John Smith »

chvenkat.v wrote:Hi


What is the difference b/w before & after job routines in Datastage? And when we will use those routines in datastage jobs (i.e. tell me situations when we are using them in datastage jobs and why)

thnks
venkat
there are many different situations where you might consider using it, most time if you need to call a unix script to do something before the job runs you will use the Before job routine. Examples of this would be say some file (data)cleansing or massaging,generating schema files,checking that trigger file exists,running a FTP script to grab files,sending notification via emails/sms and so on.
After Job routines may be some cleanup scripts,archiving,renaming files,getting some statistics ,sending email notifications of job completion and so on.
question is what do you want to do ?
Post Reply