Page 1 of 1

Sequence Elapsed Times

Posted: Wed Jun 23, 2010 1:46 pm
by kishorenvkb
Hello Everyone,

We have created an after job sub routine, which would get the details like runtimes, record count, cpu... into a file, which will be later loaded into a Teradata table for analysis. This routine is called in all jobs in "After Job Subroutine".

The question is, how can I capture the sequence run times?

Thanks for the help in advance

Kishore

Posted: Wed Jun 23, 2010 2:53 pm
by kduke
You can do the same for sequences. What is the problem?

Posted: Wed Jun 23, 2010 5:33 pm
by ray.wurlod
Sequences don't have after-job subroutines. But you could make the final activity in the sequence a Routine activity that does the same thing.

Posted: Thu Jun 24, 2010 1:06 pm
by kishorenvkb
Exactly... there is no after-job subroutine's within the Sequence. Ray, adding the Rotuine Activity within the sequence cannot help me to capture the EndTimeStamp of the sequence as technically the sequence is not complete until after the Routine Activity is completed. Isn't it?

Thanks

Posted: Thu Jun 24, 2010 1:30 pm
by chulett
You can certainly consider them to be equivalent given the fact that the Routine Activity will be the last thing that the Sequence runs.

Posted: Thu Jun 24, 2010 2:28 pm
by kishorenvkb
Okay. I haven't done this before. Can we write something outside of the Datastage (or within a datastage) to go and collect the start and end time for the latest run of every sequence within the project? Can someone share a sample with me?

Thanks in advance.

Posted: Thu Jun 24, 2010 5:07 pm
by ray.wurlod
kishorenvkb wrote:Ray, adding the Rotuine Activity within the sequence cannot help me to capture the EndTimeStamp of the sequence as technically the sequence is not complete until after the Routine Activity is completed. Isn't it?
The same argument that applies to an after-job subroutine, isn't it?

The times to the nearest whole second are likely to be identical anyway.

You can always run a completely separate routine/sequence to retrieve this information once the sequence under investigation has completed successfully.

Posted: Fri Jun 25, 2010 6:51 am
by kishorenvkb
I cannot see anything that Ray wrote as I am not a member. Hopefully the members got some benefit out of this conversation.

Thanks anyways!

Posted: Fri Jun 25, 2010 7:00 am
by chulett
Yes, outside or inside DataStage is perfectly feasible. Check out the "dsjob -jobinfo" option from the command line or the DSGet* API function equivalent.

Posted: Fri Jun 25, 2010 8:15 am
by kishorenvkb
Thanks Chulett and Ray.

Posted: Fri Jun 25, 2010 4:21 pm
by ray.wurlod
kishorenvkb wrote:I cannot see anything that Ray wrote as I am not a member. Hopefully the members got some benefit out of this conversation.

Thanks anyways!
Your problem is easily remedied.