DSStopJob

Use the DSStopJob function to immediately send a stop request to the runtime engine. Use this function only after a DSRunJob is issued.

The call is asynchronous. If you need to know that the job has actually stopped, you must call DSWaitForJob or use the Sleep statement and poll for DSGetJobStatus. The stop request is sent regardless of the job's current status.

Syntax


ErrCode = DSStopJob (JobHandle)

JobHandle is the handle for the job as derived from DSAttachJob.

ErrCode is 0 if DSStopJob is successful, otherwise it might be the following:

  • DSJE.BADHANDLE Invalid JobHandle.

Example

The following command requests that the qsales job is stopped:


stoperr = DSStopJob(qsales_handle)