Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
RoutineName = 'isFinished'
Output = 0
SystemReturnCode = 0
JobStatus = DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)
Call DSLogInfo(JobStatus, "IsFinished")
ErrorCode = 0 ;* set this to non-zero to stop the stage/job
If JobStatus = 0 or JobStatus = 1 or JobStatus = 2 Then
ExecName = 'touch ' : InputArg : '.test'
Call DSExecute('DOS', ExecName, Output, SystemReturnCode)
ErrorCode = 0
RETURN
End Else
Call DSLogInfo(JobStatus, "IsFinished")
ErrorCode = JobStatus
RETURN
End