DSAttachJob

Attaches to a job in order to run it in job control sequence. A handle is returned which is used for addressing the job. There can only be one handle open for a particular job at any one time.

Syntax

JobHandle = DSAttachJob (JobName, ErrorMode)

JobHandle is the name of a variable to hold the return value which is subsequently used by any other function or routine when referring to the job. Do not assume that this value is an integer.

JobName is a string giving the name of the job to be attached to.

ErrorMode is a value specifying how other routines using the handle should report errors. It is one of:

Remarks

A job cannot attach to itself.

The JobName parameter can specify either an exact version of the job in the form job%Reln.n.n, or the latest version of the job in the form job. If a controlling job is itself released, you will get the latest released version of job. If the controlling job is a development version, you will get the latest development version of job.

Example

This is an example of attaching to Release 11 of the job Qsales:

Qsales_handle = DSAttachJob ("Qsales%Rel1", 
→ DSJ.ERRWARN)