DSGetJobInfo

Use the DSGetJobInfo function to retrieve information about the status of a job.

Syntax


int DSGetJobInfo(
   DSJOB JobHandle,
      int InfoType,
      DSJOBINFO *ReturnInfo
);

Parameters

JobHandle is the value returned from DSOpenJob.

InfoType is a key indicating the information to be returned and can have any of the following values:

This key...
Returns this information...
DSJ_JOBSTATUS
The current status of the job.
DSJ_JOBNAME
The name of the job referenced by JobHandle.
DSJ_JOBCONTROLLER
The name of the job controlling the job referenced by JobHandle.
DSJ_JOBSTARTTIMESTAMP
The date and time when the job started.
DSJ_JOBWAVENO
The wave number of last or current run.
DSJ_JOBDESC
The Job Description specified in the Job Properties dialog box.
DSJ_JOBFULLDESSC
The Full Description specified in the Job Properties dialog box.
DSJ_JOBDMISERVICE
Set to true if this is a Web service job.
DSJ_JOBMULTIINVOKABLE
Set to true if this job supports multiple invocations.
DSJ_PARAMLIST
A list of job parameter names. Separated by nulls.
DSJ_STAGELIST
A list of active stages in the job. Separated by nulls.
DSJ_USERSTATUS
The value, if any, set as the user status by the job.
DSJ_JOBCONTROL
Whether a stop request has been issued for the job referenced by JobHandle.
DSJ_JOBPID
Process id of DSD.RUN process.
DSJ_JOBLASTTIMESTAMP
The date and time when the job last finished.
DSJ_JOBINVOCATIONS
List of job invocation ids. The ids are separated by nulls.
DSJ_JOBINTERIMSTATUS
The status of a job after it has run all stages and controlled jobs, but before it has attempted to run an after-job subroutine. (Designed to be used by an after-job subroutine to get the status of the current job.)
DSJ_JOBINVOCATIONID
Invocation name of the job referenced by JobHandle.
DSJ_JOBDESC
A description of the job.
DSJ_STAGELIST2
A list of passive stages in the job. Separated by nulls.
DSJ_JOBELAPSED
The elapsed time of the job in seconds.

ReturnInfo is a pointer to a DSJOBINFO data structure where the requested information is stored. The DSJOBINFO data structure contains a union with an element for each of the possible return values from the call to DSGetJobInfo. For more information, see Data Structures.

Return Values

If the function succeeds, the return value is DSJE_NOERROR.

If the function fails, the return value is one of the following:

Token
Description
DSJE_NOT_AVAILABLE
There are no instances of the requested information in the job.
DSJE_BADHANDLE
Invalid JobHandle.
DSJE_BADTYPE
Invalid InfoType.

Remarks

For controlled jobs, this function can be used either before or after a call to DSRunJob.