STAGESTARTTIMESTAMP , STAGEENDTIMESTAMP

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
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

STAGESTARTTIMESTAMP , STAGEENDTIMESTAMP

Post by Titto »

I need to get the Stage Start timestamp and End Time stamp as part to log the timings and statuses of the each stage in my job.

I am proving in Transformer stage where it write to a Seg log file
DSGetStageInfo(DSJ.ME, DSStageName,DSJ.STAGESTARTTIMESTAMP)
DSGetStageInfo(DSJ.ME, DSStageName,DSJ.STAGEENDTIMESTAMP)
start time it is populating but End Timestamp coming as 0. Any ideas why it is coming.

Then i changes from Stage to Job level using DSJ.JOBSTARTTIMESTAMP and DSJ.JOBLASTTIMESTAMP. with Job Last Timestamp i am not able to comple the job.

Any input is appreciated!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't do it in the Transformer stage, which is still running when you execute the function calls. Do it in an after-job subroutine or in a routine executed after the job finishes completely (probably invoked from a job sequence).
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 »

So in this case,
DSJ.STAGEDNDTIMESTAMP can be captured in next comming stage to what the time stamp to be determined.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Nope. Unless there are dependant sections in your job and you are checking from the 'other side' of the dependancy, none of the stages complete until the job completes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can see this most easily in the job log. Look for where the "active stage finishing" messages appear. They tend to bunch just ahead of the "job finishing" message.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

So, we can't capture the STAGEENDTIMESTAMP or JOBLASTTIMESTAMP in the same job. Is there any way to capture STAGEENDTIMESTAMP if i have 3 transformer stages.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can capture them in the same job, but only reliably in an after-job subroutine, which executes only after everything else has finished.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

are there any sample codes which i can use.

thanks
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

How about viewtopic.php?t=91146&highlight=dsj+jobstarttimestamp Do an exact search on JOBSTARTTIMESTAMP. Should show you a lot of code already posted. I would imagine STAGESTARTTIMESTAMP is not much different.
Mamu Kim
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Thanks Duke, i will try to inplement this.
Post Reply