This program allows you to create a record within the jobs table and returns a job ID along with an error state as output.
Parameters
NUM_BIN_4 |
Id |
(Output) Job ID. This value is calculated automatically.
|
ALPHA(50) |
Name |
Job name.
|
ALPHA(50) |
Type |
Job type (optional). The job type is an identifier used to lock simultaneous executions of jobs of the same type (execution unicity parameter).
|
NUM_BIN_2 |
Unicity |
Unicity of execution in relation to type (0 or 1 value).
|
ALPHA(30) |
Profile |
Profile of the user who submitted the job. The user profile must be specified if the user management functions are being used.
|
TIMESTAMP |
ActivationDate |
Job activation date. It is possible to delay the start of the job by specifying an activation date. This does not guarantee that the job will be run from that date (it will not do so if another job of higher priority is queued).
|
ALPHA(250) |
Machine |
Machine on which the job must be run (optional). It is possible to specify which machine (which job manager) will run the job. According to the configuration, any active job manager can run a job if the machine has not been specified.
|
NUM_BIN_4 |
QueueID |
Queue ID. The queue ID is a free integer. The job will be run if at least one job manager has been configured to manage this queue.
|
NUM_BIN_2 |
Priority |
Job priority, from 1 (high) to 5 (low). Jobs are run in ascending order of their priority provided they can be activated. A priority 1 job will always be run before a priority 2 job if the 2 jobs can be activated (i.e. are accepted by the machine and with a past activation date).
|
ALPHA(1) |
FlagArchive |
Archiving mode: Possible values: ' ' no archiving, 'A' the report will be protected from deletion. 'D the report will be deleted after the job has run. |
NUM_BIN_4 |
MaxExec |
Maximum run time before generating an alert. |
ALPHA(250) |
Program |
Program name (if the program adheres to the naming convention) or *SYSTEM, *CONSOLE for system commands.
|
ALPHA(1024) |
Parameter1 |
Parameter 1 of the program (if the program adheres to the naming convention) or system command line.
|
ALPHA(1024) |
Parameter2 |
Parameter 2 of the program (if the program adheres to the naming convention).
|
NUM_BIN_4 |
ReturnCode |
(Output) Program return code: 0 if the job has been created; SQL error code if not. |
The program field contains the name of the program to be run.
The program must adhere to the following naming convention: program <parameter1> <parameter2> <job id>.
This program must interface with the job manager database to update the report (e.g. by using the TR_ADD_REPORT interface program) and the job state (finished successfully, with error, with warning: TR_SET_JOB_STAT interface program).
Parameters 1 and 2 are ALPHA fields with a maximum length of 1024 characters.
It is possible to run a generic system command by specifying *SYSTEM or *CONSOLE as the program name. In this case, parameter 1 is considered to contain the command line to be run. Parameter 2 is ignored. The job is run using a DOS command prompt.
With *SYSTEM, the job manager hides the command prompt and intercepts the command output to create the report. With *CONSOLE, the program is displayed in a DOS window where you can enter parameters as necessary. The report is therefore empty. In both cases, the job is considered to have completed successfully if the command return code (errorlevel) is 0. Any other value indicates that errors have occurred.