Page 1 of 1

Need to enter job run details to audit table

Posted: Wed Nov 22, 2006 12:38 am
by jojipjohn
Hi,

In my project there is a requirement to load the job start time, endtime, status and records loaded to a audit table each time the job runs. Anyone who have done a similar job, could you please tell me how to do this.
If you have similar jobs, could you please send me the dsx of these jobs to jojipjohn@yahoo.com.

Thanks

Posted: Wed Nov 22, 2006 1:13 am
by userasif
Think how you can insert job endtime while still the job is running.
You can do it in After Job Routine by in your routine.

Regards,
ITsME

Posted: Wed Nov 22, 2006 2:04 am
by jojipjohn
Yes this is true but the in built routine write these into a file. since the server is in windows I cabn not use shell script to grep the relevent information from this file and load it to database. Is there a way I can enter these information direcly to database

Posted: Wed Nov 22, 2006 2:46 am
by userasif
Ok. You can create your own sequential file and write data to this file after job completion and then in other job extract this data from file and load into database table..........Do all this in a sequencer.
Use code written in built in routine and customize it..... :D

Hopefully this will help you.

Regards,

ITsME

Posted: Wed Nov 22, 2006 4:48 am
by aakashahuja
Use the DSGetJobInfo function of DataStage. You will get all the information you want.

Cheers

Posted: Wed Nov 22, 2006 6:11 am
by BalageBaju
Also you can get the number of rows passed in target by using the function "DSGetLinkInfo".

Posted: Fri Nov 24, 2006 4:33 am
by prmuttireddy
Hi,

Using the Routine activity u can get status with full details of the job information.

Reddy.

Posted: Fri Nov 24, 2006 4:59 am
by sb_akarmarkar
Hi,


Better create a new multiple instance job which get all information from DSGetJobInfo() and loads into audit table. Parameterize job name in Multi Instance job.... Which runs in sequence after main job....


__________
Anupam

Posted: Fri Nov 24, 2006 3:15 pm
by kduke
Do a search for EtlStats.