Find the "Last_Run_Time" and insert it in a table
Moderators: chulett, rschirm, roy
Find the "Last_Run_Time" and insert it in a table
Hi All,
My requirement is to find the Start time, End time of a job and then insert it in an oracle table.
Please can any one help me to know the different options i can try on because even if i take the start time through a Basic function how will i pass that value to insert it in a Database?
Also one more thing...Can I execute a Oracle script through an after job routine?
Thanks in Advance.
My requirement is to find the Start time, End time of a job and then insert it in an oracle table.
Please can any one help me to know the different options i can try on because even if i take the start time through a Basic function how will i pass that value to insert it in a Database?
Also one more thing...Can I execute a Oracle script through an after job routine?
Thanks in Advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Find the run times by invoking DSGetJobInfo() or equivalent DSMacros. You can do this in a Transformer stage triggered by, say, a SELECT against the DUAL table.
The answer to your second question is yes, but not directly - after all, an Oracle script is not a DataStage after-job subroutine. The after-job subroutine has to invoke the Oracle script appropriately, either via sqlplus or through BCI functions.
The answer to your second question is yes, but not directly - after all, an Oracle script is not a DataStage after-job subroutine. The after-job subroutine has to invoke the Oracle script appropriately, either via sqlplus or through BCI functions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
you create a custom routine(after job subroutine), in routine use the DSGetJobInfo Function and get the value for DSJ.JOBSTARTTIMESTAMP infotype (this is the start time of your job) and get one value like JobEndTime = DSRTimestamp() in routine which is the end time of your job, then use DSExecute Function to insert value in database.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: