Page 1 of 1

JobControl in Routine

Posted: Fri Aug 01, 2008 4:44 am
by myukassign
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

Posted: Fri Aug 01, 2008 5:34 am
by ArndW
Do you have a "$INCLUDE DSINCLUDE JOBCONTROL.H" in the code? The DSJS.CRASHED value is declared in that file.

Posted: Fri Aug 01, 2008 6:19 am
by myukassign
Whooooooooooooooooooooooooooo!!!!!!!!!

My issue resolved and m happy likethis :D

Thanks a lot