Job Start Time

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
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Job Start Time

Post 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.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply