DMSRVKILLJOB Function

Terminates a job that is running on a DataFlux Data Management Server.

Valid in: DATA step, PROC SQL, and SCL

Syntax

DMSRVKILLJOB(job-ID, host, port)

Required Arguments

job-ID

identifies the job submitted to a DataFlux Data Management Server. The identifier is set by a function such as DMSRVBATCHJOB.

host

identifies the host of the DataFlux Data Management Server. The host name can be a variable or a literal string. The literal string or the value of the variable is the URL of the server in single quotation marks.

When DataFlux Data Management Server is secured with SSL, the URL must use https instead of http (for example, https://myhost.unx.com).
Interaction If a zero-length string is entered for the host argument, then the value localhost is used.
Example
        /* Incorrect use of function arguments */
           dmsrvKillJob('jobid');

        /* Localhost is used for the host */
           dmsrvKillJob('jobid', '', 21036);

        /* Correct */
           dmsrvKillJob('jobid', 'http://myhost.unx.com', 21036);   

port

identifies the port through which the host communicates with the DataFlux Data Management Server.

Interaction If the value specified is less than or equal to 0, then port number 21036 is used with SOAP, or port number 21037 is used when using Wireline.
Example
        /* Incorrect use of function arguments */
           dmsrvKillJob('jobid');

        /* Port 21036 or 21037 is used */   
           dmsrvKillJob('jobid', 'http://myhost.unx.com', 0);

        /* Correct */
           dmsrvKillJob('jobid', 'http://myhost.unx.com', 21036);   

Details

The DMSRVKILLJOB function terminates a job. Use the DMSRVJOBSTATUS function to determine whether a job is still running. Return values are 0 (job terminated) or 1 (job failed to terminate).

Example: DMSRVKILLJOB Function

The following example terminates a job that is running on a DataFlux Data Management Server. The job identifier is returned by the function that ran the job. Status information is returned in 20 seconds or less, depending on the termination of the job. Job status is checked every 5 seconds.
killrc= dmsrvKillJob(jobid,'http://myhost.unx.com',5001);