JobControl in Routine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

JobControl in Routine

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you have a "$INCLUDE DSINCLUDE JOBCONTROL.H" in the code? The DSJS.CRASHED value is declared in that file.
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Post by myukassign »

Whooooooooooooooooooooooooooo!!!!!!!!!

My issue resolved and m happy likethis :D

Thanks a lot
Post Reply