The StartJob Method

Previous Next

See Also

NOTE:

The StartJob method has been deprecated in USoft 8. It is still supported for backward compatibility, but you should use the RunJob method wherever possible. The RunJob method includes all the functionality that was offered by the StartJob method, and also offers options for return status.

The StartJob method has almost the same behavior as the ActionStartJob() application method. The main addition is that methods of a component can be called from an INVOKE statement.

The StartJob method cannot be called from a constraint.

The job parameters must be named. There is one mandatory JobName parameter, and several optional JobParameter parameters. Through these JobParameter parameters you can pass parameters for the parameter set of a job. You can also pass pre-defined job parameters.

JobParameter:

'-quiet'

executes the job without displaying any information messages or prompts. Error messages are always displayed: they are not affected by the -quiet parameter. If a log file has been specified, all the usual information is logged, irrespective of whether or not -quiet has been specified.

The StartJob method returns 0 if successful.

Example:

To start an EXPORT_TOURS batch job with job input parameters DESTINATION and YEAR, execute the following statement:

INVOKE BatchRunner.StartJob

WITH

SELECT 'EXPORT_TOURS' JobName,

   'DESTINATION=AUSTRALIA' JobParameter,

   'YEAR=2003' JobParameter