Need to enter job run details to audit table

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
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Need to enter job run details to audit table

Post 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
Joji John
userasif
Participant
Posts: 50
Joined: Tue Jun 06, 2006 5:57 am

Post 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
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Post 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
Joji John
userasif
Participant
Posts: 50
Joined: Tue Jun 06, 2006 5:57 am

Post 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
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Use the DSGetJobInfo function of DataStage. You will get all the information you want.

Cheers
BalageBaju
Participant
Posts: 34
Joined: Fri Sep 22, 2006 10:59 pm
Location: India

Post by BalageBaju »

Also you can get the number of rows passed in target by using the function "DSGetLinkInfo".
prmuttireddy
Participant
Posts: 30
Joined: Tue Jun 20, 2006 10:22 pm

Post by prmuttireddy »

Hi,

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

Reddy.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post 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
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Do a search for EtlStats.
Mamu Kim
Post Reply