Hello To All:
I have an After job server routine that captures jobs statistics, row counts etc. In this routine I have the following code
JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
The content of JobStatus is 0[zero] when we insert it into an ODS logging table when the job completes OK. Instead of JobStatus =0 or 1, I want to place some meaningful status ie "Complete"or "Failed" instead of 0 or 1. Therefore I have coded the following:
if JobStatus = 0 then
TheJobStatus ="Complete"
end
else
TheJobStatus ="Failed"
end
When I pass the variable "TheJobStatus" into my calling function which inserts the job status into the ODS table, nothing gets passed. Can you tell me what I am doing wrong and/or is there a better way of doing this?
Also is there a way to display the content of variable "TheJobStatus" or "JobStatus" for debugging purpose while testing?
Thanks In Advance for your help and ideas
--dtatem
Capturing Server JobStatus Variable
Moderators: chulett, rschirm, roy
Re: Capturing Server JobStatus Variable
Can you tell me what is the variable for "INTERIM" status
dtatem wrote:Hello To All:
I have an After job server routine that captures jobs statistics, row counts etc. In this routine I have the following code
JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
The content of JobStatus is 0[zero] when we insert it into an ODS logging table when the job completes OK. Instead of JobStatus =0 or 1, I want to place some meaningful status ie "Complete"or "Failed" instead of 0 or 1. Therefore I have coded the following:
if JobStatus = 0 then
TheJobStatus ="Complete"
end
else
TheJobStatus ="Failed"
end
When I pass the variable "TheJobStatus" into my calling function which inserts the job status into the ODS table, nothing gets passed. Can you tell me what I am doing wrong and/or is there a better way of doing this?
Also is there a way to display the content of variable "TheJobStatus" or "JobStatus" for debugging purpose while testing?
Thanks In Advance for your help and ideas
--dtatem
Re: Capturing Server JobStatus Variable
I was a bit quick on the submit button..but I found the variable..
thanks
thanks
dtatem wrote:Can you tell me what is the variable for "INTERIM" status
dtatem wrote:Hello To All:
I have an After job server routine that captures jobs statistics, row counts etc. In this routine I have the following code
JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
The content of JobStatus is 0[zero] when we insert it into an ODS logging table when the job completes OK. Instead of JobStatus =0 or 1, I want to place some meaningful status ie "Complete"or "Failed" instead of 0 or 1. Therefore I have coded the following:
if JobStatus = 0 then
TheJobStatus ="Complete"
end
else
TheJobStatus ="Failed"
end
When I pass the variable "TheJobStatus" into my calling function which inserts the job status into the ODS table, nothing gets passed. Can you tell me what I am doing wrong and/or is there a better way of doing this?
Also is there a way to display the content of variable "TheJobStatus" or "JobStatus" for debugging purpose while testing?
Thanks In Advance for your help and ideas
--dtatem
Re: Capturing Server JobStatus Variable
The JOBINTERIMSTATUS states the following:
DSJ.JOBINTERIMSTATUS. Returns the status of a job after it has run all stages and controlled jobs, but before it has attempted to run an after-job subroutine. (Designed to be used by an after-job subroutine to get the status of the current job)
My question is does it return 1 or 0 or someother value? if it returns "someothervalue" what is that value?
How do I display its content while debugging.
regards
-dtatem
DSJ.JOBINTERIMSTATUS. Returns the status of a job after it has run all stages and controlled jobs, but before it has attempted to run an after-job subroutine. (Designed to be used by an after-job subroutine to get the status of the current job)
My question is does it return 1 or 0 or someother value? if it returns "someothervalue" what is that value?
How do I display its content while debugging.
regards
-dtatem
dtatem wrote:Can you tell me what is the variable for "INTERIM" status
dtatem wrote:Hello To All:
I have an After job server routine that captures jobs statistics, row counts etc. In this routine I have the following code
JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
The content of JobStatus is 0[zero] when we insert it into an ODS logging table when the job completes OK. Instead of JobStatus =0 or 1, I want to place some meaningful status ie "Complete"or "Failed" instead of 0 or 1. Therefore I have coded the following:
if JobStatus = 0 then
TheJobStatus ="Complete"
end
else
TheJobStatus ="Failed"
end
When I pass the variable "TheJobStatus" into my calling function which inserts the job status into the ODS table, nothing gets passed. Can you tell me what I am doing wrong and/or is there a better way of doing this?
Also is there a way to display the content of variable "TheJobStatus" or "JobStatus" for debugging purpose while testing?
Thanks In Advance for your help and ideas
--dtatem
It returns the 'standard' status values as documented in the $DSHOME/include/dsapi.h file and elsewhere:
Code: Select all
/* 'jobStatus' values... */
#define DSJS_RUNNING 0 /* Job running */
#define DSJS_RUNOK 1 /* Job finished a normal run with no warnings */
#define DSJS_RUNWARN 2 /* Job finished a normal run with warnings */
#define DSJS_RUNFAILED 3 /* Job finished a normal run with a fatal error */
#define DSJS_VALOK 11 /* Job finished a validation run with no warnings */
#define DSJS_VALWARN 12 /* Job finished a validation run with warnings */
#define DSJS_VALFAILED 13 /* Job failed a validation run */
#define DSJS_RESET 21 /* Job finished a reset run */
#define DSJS_CRASHED 96 /* Job was stopped by some indeterminate action */
#define DSJS_STOPPED 97 /* Job was stopped by operator intervention (can't tell run type) */
#define DSJS_NOTRUNNABLE 98 /* Job has not been compiled */
#define DSJS_NOTRUNNING 99 /* Any other status */
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Interim status is the job status assuming that the after-job subroutine that calls it returns properly - without generating warnings or errors and with ErrorCode argument set to 0 - that is, the job status that would obtain if there were no after-job subroutine.
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.