JobControl in Routine
Posted: Fri Aug 01, 2008 4:44 am
Can I write job control commands in routines / Subroutines? Like the one i given below. When I used there it give me lot of compilatiopn error like, so many variables undefined like the following error.
DSJS.CRASHED is never assigned a value
Can anyoen help me by an answer?
hJob1 = DSAttachJob("FitlerCommand", DSJ.ERRFATAL)
If NOT(hJob1) Then
Call DSLogFatal("Job Attach Failed: FitlerCommand", "JobControl")
Abort
End
ErrCode = DSRunJob(hJob1, DSJ.RUNRESET )
ErrCode = DSWaitForJob(hJob1)
Status = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
If Status = DSJS.RUNFAILED Or Status = DSJS.CRASHED Then
* Fatal Error - No Return
Call DSLogFatal("Job Failed " , "JobControl")
End
DSJS.CRASHED is never assigned a value
Can anyoen help me by an answer?
hJob1 = DSAttachJob("FitlerCommand", DSJ.ERRFATAL)
If NOT(hJob1) Then
Call DSLogFatal("Job Attach Failed: FitlerCommand", "JobControl")
Abort
End
ErrCode = DSRunJob(hJob1, DSJ.RUNRESET )
ErrCode = DSWaitForJob(hJob1)
Status = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
If Status = DSJS.RUNFAILED Or Status = DSJS.CRASHED Then
* Fatal Error - No Return
Call DSLogFatal("Job Failed " , "JobControl")
End