Hi,
I need to capture Audit info like job start time, end time, no. of rows processed etc into a table.
My plan is to write a routine which will write all the stats to a sequential file and then I am planning to read that file and update database..
I want to know if i can achieve all the above in any other way..like can i get through a bat script?? If not, can any one tell how can i make routine to write info in a readable format.
I am new to routines as well as bat scripts.Please note that environment is Windows.
Windows -- Audit Table
Moderators: chulett, rschirm, roy
Windows -- Audit Table
Regards,
Jay
Jay
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Download ETLstats from Kim Duke's web site for free. All the work's already been done for you.
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.
Re: Windows -- Audit Table
That will complicate your effort but this should be a great learning experience.Jaydev wrote:I am new to routines as well as bat scripts.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Ray, Thanks for your reply, but I couldnt download stats due to restrictive environment I am in.
HiChulett, Thanks for suggestion and I started learning routines.
For the same topic which I posted, I am facing below error when compiling the routine.
Can any one look in to it and tell why I am facing this Variable 'Ans' issue which I never declared in code.
Compiling: Source = 'DSU_BP/DSU.DSSTATISTICS', Object = 'DSU_BP.O/DSU.DSSTATISTICS'
************************************************
WARNING: Variable 'Ans' never assigned a value.
Code is as below which will write stats to job logs. can any one also say how can I write it to a text file which can be readable by a DS job.
Thanks All.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle = DSJ.ME
JobName = DSGetJobInfo(JobHandle,DSJ.JOBNAME)
JobStarted = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBSTARTTIMESTAMP))
JobEnd = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP))
call DSLogInfo("Job Name: ":JobName,"Job")
call DSLogInfo("Job Start TimeStamp : ":JobStarted, "Job")
call DSLogInfo("Job End TimeStamp : ":JobEnd, "Job")
HiChulett, Thanks for suggestion and I started learning routines.
For the same topic which I posted, I am facing below error when compiling the routine.
Can any one look in to it and tell why I am facing this Variable 'Ans' issue which I never declared in code.
Compiling: Source = 'DSU_BP/DSU.DSSTATISTICS', Object = 'DSU_BP.O/DSU.DSSTATISTICS'
************************************************
WARNING: Variable 'Ans' never assigned a value.
Code is as below which will write stats to job logs. can any one also say how can I write it to a text file which can be readable by a DS job.
Thanks All.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle = DSJ.ME
JobName = DSGetJobInfo(JobHandle,DSJ.JOBNAME)
JobStarted = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBSTARTTIMESTAMP))
JobEnd = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP))
call DSLogInfo("Job Name: ":JobName,"Job")
call DSLogInfo("Job Start TimeStamp : ":JobStarted, "Job")
call DSLogInfo("Job End TimeStamp : ":JobEnd, "Job")
Regards,
Jay
Jay
-
- Participant
- Posts: 117
- Joined: Wed Feb 06, 2013 9:24 am
- Location: Chennai,TN, India
Hi Prasanna,
Thanks for pointing out., 'Ans' is a default variable expecting some return value. I gave Ans=0 in code and it compiled successfully.
I ran this as an After job routine and could see results in logfiles.
But I couldnt see END Timestamp. I searched in forum, and syntax looks correct. Any idea why it is not returning value. Currently it is blank, I made change by giving only one 'T' in 'LASTTIMESTAMP', it is giving '5' which means what i changed is wrong.
So what is wrong in below statement and how will it populate correct value.
JobEnd = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP))
Thanks.
Thanks for pointing out., 'Ans' is a default variable expecting some return value. I gave Ans=0 in code and it compiled successfully.
I ran this as an After job routine and could see results in logfiles.
But I couldnt see END Timestamp. I searched in forum, and syntax looks correct. Any idea why it is not returning value. Currently it is blank, I made change by giving only one 'T' in 'LASTTIMESTAMP', it is giving '5' which means what i changed is wrong.
So what is wrong in below statement and how will it populate correct value.
JobEnd = convert(" :-","_",DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP))
Thanks.
Regards,
Jay
Jay