Getting the very first event of the job log

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
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Getting the very first event of the job log

Post by dspxlearn »

Hi,

I am trying to get the first event id from the log whenever the job starts.
Using this event id i want to capture all the parameter values used in the job.
Using this is could get only the last event id.
DSGetLogEntry(JobHandle, DSGetNewestLogId(JobHandle, DSJ.LOGANY))
Can anyone suggest me how to get this?
Thanks and Regards!!
dspxlearn
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not use DSGetJobInfo() to get the parameter names and DSGetParamInfo() to get the parameter values?

If you insist on using the log, investigate the DSGetNewestLogId() function, in particular the InfoType argument to get a "Started" event.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Or you can search for 'Job Start Time' from JobInfo.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

You can also use 'dsjob' command in the unix.
The following command will give you Start time and the End time of the particular job.

Code: Select all

$DSHOME/bin/dsjob -logsum  -type STARTED  -max 2 Project_name  TESTING_SO1(Job_name)
63      STARTED Fri Apr 11 12:42:10 2008
        Starting Job TESTING_SO1. (...)
83      STARTED Fri Apr 11 12:42:14 2008
        Finished Job TESTING_SO1.
First column is Event id from the log whenever the job starts. :D
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
Post Reply