Call Low-Level Job DLL Functions

JOBCALL batfile function parm1 parm2 parm3

This program provides a low-level interface to functions in the Job Administration dynamic link library. It is designed to be called from a user-written batch file and itself writes a second batch file to place its results into environment variables. DLL functions allow creation and launching of jobs, and processing any of the action codes listed in Appendix J.

JOBCALL provides an interface to these functions without your having to write a program which directly calls the DLL.

The JOBCALL program takes as a first argument the name of a batch file which will be created by the program. This batch file contains SET commands which set environment variables, allowing the results of the DLL call to be interrogated by means of standard IF statements. The general scheme of a batch file to run JOBCALL is as follows:



JOBCALL MYBATCH.BAT function parm1 parm2 parm3


IF %JOBCALL%==0 ....

The commands written into the passed batch file are as follows:

SET JOBCALL=(return value from DLL)

SET JOBERROR=(error string, see below)

SET DLLPARM1=(value returned in Parm1)

SET DLLPARM2=(value returned in Parm2)

The error string will be NODLL if the DLL cannot be loaded or NOENTRY if the entry point cannot be found in the library. In these cases the JOBCALL value will be the same string. Otherwise there will be no value on the JOBERROR line (so the environment variable will be deleted).

If you call this function from a COPIAFACTS run box it is ESSENTIAL that you create a batch file name for 'mybatch' that incorporates the line and node name values. Otherwise the same batch file may be written to concurrently from different lines. Alternatively you may use the keyword NOBATCH as the first parameter and the function will be called with no batch file written. In this case you cannot retrieve the result of the DLL call.

FFTRACE will report additional information for the JOBCALL processing if this program is added to the list of applications being traced. JOBCALL will return a non-zero errorlevel if the batch file cannot be written.

See also:

Job DLL functions and Job DLL Syntax