Page 1 of 1

Job Start Time

Posted: Mon Jan 17, 2005 11:09 pm
by anupam
Hello,

We have a status table where we want to insert the start time of the job when it starts. Once the Job is finished, we want to update the same row with the end time, number of rows read etc.

We have taken JobName and StartTime as the Key.

The problem is when we are running Job. We are taking
DSGetJobInfo(DSJ.ME, DSJ.JOBSTARTTIMESTAMP)
in the transformer and inserting in the status table.
And in after Job we are calling a routine which internally executes the same DSGetJobInfo(DSJ.ME, DSJ.JOBSTARTTIMESTAMP) function for the same Job and calculates other additional information.

The Problem is the starttime from the transformer and the starttime calculated from the routine differs by a second or so. It is not at alll possible for us to update the table as the timestmp differs.

Please suggest how can we get the same time from both.

also we tried to get JOBPID but getting 0 always in case of parallel Jobs.

Posted: Tue Jan 18, 2005 12:46 am
by ray.wurlod
The value returned by DSGetJobInfp(DSJ.ME, DSJ.JOBSTARTTIMESTAMP) should - as you imply - remain constant throughout execution of the job. Sounds like you may have uncovered a bug - report it through your support provider.

In the meantime, set a job parameter with the job start time from the controlling job, and access that parameter value throughout your job design.

We know, on this site, that job parameter values cannot be changed while the job is running! :twisted:

Posted: Tue Jan 18, 2005 2:14 am
by roy
Hi,
Just wanted to add that if you use job controll you probably have access to the macros wich should replace the DSGetJobInfo() to DSJobStartTimestamp or DSJobStartDate and DSJobStartTime if you need them seperatly.
hmm on second thought if you use a sequence job to run the parallel one you might just put them as values for the parameter itself.

IHTH,

Posted: Tue Jan 18, 2005 7:50 am
by chulett
Hmmm.... This post might help explain the 'start time from the transformer' part of the problem. Maybe. Depending on exactly how it's being done. :?