DMSRVCOPYLOG Function

Copies a job's log file from a DataFlux Data Management Server to a local host.
Valid in: DATA step, PROC SQL, and SCL

Syntax

DMSRVCOPYLOG (job-ID, host, port, filename )

Required Arguments

job–ID
identifies the job that is submitted to a DataFlux Data Management Server. The identifier is previously returned by a function such as DMSRVBATCHJOB.
host
identifies the host of the DataFlux Data Management Server.
Interaction:If a zero-length string is entered for the host argument, then the value localhost will be used.
Example:
        /* Incorrect use of function arguments */
           dmsrvCopyLog('jobid');   
        /* Localhost is used for the host */
           dmsrvCopyLog('jobid', '', 21036, 'filename'); 

        /* Correct */
           dmsrvCopyLog('jobid', dmsrvhostname, 21036, 'filename');   
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 */
           dmsrvCopyLog('jobid'); 

        /* Port 21036 or 21037 is used */
           dmsrvCopyLog('jobid', dmsrvhostname, 0, 'filename'); 

        /* Correct */
           dmsrvCopyLog('jobid', dmsrvhostname, 21036, 'filename');   
filename
identifies where the log file is copied on the local host.

Details

To capture log information for a particular job, use the DMSRVJOBSTATUS function to ensure that the job is finished before you copy the log.
Return values are 0 (log copied successfully) or 1 (log failed to copy).

Example: DMSRVCOPYLOG Function

The following example copies a log file from a DataFlux Data Management Server. The log file is generated when the server runs a job. The job identifier is returned in the function that runs the job.
copyrc= dmsrvCopyLog(jobid,'dmServer1', 5001,'dmServer1.log');