how to store job start date and time and job end dateandtime
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am
how to store job start date and time and job end dateandtime
Hi,
After completing of my job execution,how to store the job start date and time and end date and time in to oracle.
Thanks,
sudhakar
After completing of my job execution,how to store the job start date and time and end date and time in to oracle.
Thanks,
sudhakar
i need to know datastage
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am
Hi chulett / ray,
I did what you people said.It is not showing any errors.But,it is giving the result as -5.
And, my reqirement is whenever the job started then the start date and time has to be stored in oracle table.And,when ever the job finished then the finished date and time has to be stored in oracle table.How to achieve this.Please suggest me asap.
Thanks,
sudhakar
I did what you people said.It is not showing any errors.But,it is giving the result as -5.
And, my reqirement is whenever the job started then the start date and time has to be stored in oracle table.And,when ever the job finished then the finished date and time has to be stored in oracle table.How to achieve this.Please suggest me asap.
Thanks,
sudhakar
i need to know datastage
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
-5 which u have got is for InfoType u are using is not recognised and u should use DSJ.JOBSTARTTIMESTAMP and DSJ.JOBLASTTIMESTAMP as second arg to function (or as infotype).
TO get the start time and end time u should call the function as follows: which gives the time when job was started.
which gives the time when the job finish time when it was executed last time.
Ensure that u get correct end time, u should ensure that the second function is executed once this is not in running status. Or else if the job is running, u will get the start time corrtect, but the end time will be that of last run.
TO get the start time and end time u should call the function as follows:
Code: Select all
JobStartTime = DSGetJobInfo (JobHandle, DSJ.JOBSTARTTIMESTAMP)
Code: Select all
JobStartTime = DSGetJobInfo (JobHandle, DSJ.JOBLASTTIMESTAMP)
Ensure that u get correct end time, u should ensure that the second function is executed once this is not in running status. Or else if the job is running, u will get the start time corrtect, but the end time will be that of last run.
Regards,
S. Kirtikumar.
S. Kirtikumar.
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am
Hi Kirtikumar,
Thanks for reply.My job name is ABC.And i have used the following code in routine.But it is giving -1 as result.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobStartTime=DSGetJobInfo(ABC,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
Let me know what i have to write in jobhandle.
Thanks,
sudhakar
Thanks for reply.My job name is ABC.And i have used the following code in routine.But it is giving -1 as result.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobStartTime=DSGetJobInfo(ABC,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
Let me know what i have to write in jobhandle.
Thanks,
sudhakar
i need to know datastage
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
Very first thing - in the routine, job name for which u r calling the DSGetJobInfo, job handler needs to created. So the code should be :sudhakar_viswa wrote:Hi Kirtikumar,
$INCLUDE DSINCLUDE JOBCONTROL.H
JobStartTime=DSGetJobInfo(ABC,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
Code: Select all
Handle = DSAttachJob(ABS, DSJ.ERRFATAL)
JobStartTime = DSGetJobInfo (Handle, DSJ.JOBSTARTTIMESTAMP)
Nothing = DSDetachJob(Handle)
Regards,
S. Kirtikumar.
S. Kirtikumar.
You should using Job handle in DSGetJobInfo and not the job name.sudhakar_viswa wrote:Hi Kirtikumar,
Thanks for reply.My job name is ABC.And i have used the following code in routine.But it is giving -1 as result.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobStartTime=DSGetJobInfo(ABC,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
Let me know what i have to write in jobhandle.
Thanks,
sudhakar
JobHandle is derived from DSAttachJob Function.
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am
Hi kirtikumar / balajisr
I have written as following.But,i am getting result as -1
$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle=DSAttachJob(ABC,DSJ.ERRFATAL)
JobStartTime=DSGetJobInfo(JobHandle,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
NOTHING=DSDetachJob(JobHandle)
Reply me asap.
Thanks,
sudhakar
I have written as following.But,i am getting result as -1
$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle=DSAttachJob(ABC,DSJ.ERRFATAL)
JobStartTime=DSGetJobInfo(JobHandle,DSJ.JOBSTARTTIMESTAMP)
Ans=JobStartTime
NOTHING=DSDetachJob(JobHandle)
Reply me asap.
Thanks,
sudhakar
i need to know datastage
-
- Participant
- Posts: 85
- Joined: Fri Nov 18, 2005 5:35 am