Start and execute batch job

Before a job is submitted, a job check is done with 'Job Attributes. Select' (MNS230) to retrieve job queue and the settings for confirmation to start the job. The settings are maintained in 'Job. Connect Job Queue' (MNS310) and could be set by specific job, user or user group, where the search sequence is:

Settings in (MNS310)

Setting Description
Job queue This field indicates the queue in which the job is put for execution in a batch.
Priority This field indicates what priority the job should have in the job queue. Valid priorities are 1-9, where 1 is the highest priority.
Confirm job start

Alternatives:

0 = No, you do not need to confirm the start of a batch job.

1 = Yes, you must press Enter to confirm the start of a batch job.

2 = Yes, buttons for Yes, No or Cancel are displayed.

3 = Yes, a password is used to confirm the start of a batch job.

For alternatives 1-3, a count is performed based on the selection. The result (number of posts) is presented in a confirmation window.

For alternative 0, a check is made against 'Number of selected records limit' and 'Number of selected records notification' (see descriptions below). If the limits are exceeded, the job cannot be started.

Save job history

Select the check box to update the job history file for jobs that were successfully executed.

Jobs that are in the job queue, or jobs that ended abnormally, are always updated in the job history file regardless of this setting. The job history file can be monitored in 'Job. Display History' (MNS320).

Number of selected records limit This field indicates the limit for the number of records that are allowed in a selection. If the field is set to zero, there is no limit.
Number of selected records notification This field indicates the limit for the number of records that will trigger a selection size notification. If the field is set to zero, there is no limit. A notification will only be issued if no other confirmation alternative has been set for the job.
Duplicate job check

This field indicates if a check for a duplicate job should be done at submission of the job. A job is considered as a duplicate if the 'Open Query' is the same and the previous job is either in queue or in progress.

Valid alternatives are:

0 = No duplicate job check is performed.

1 = A duplicate job check is performed. If a duplicate job is found, a warning is issued. The job is possible to submit.

2 = A duplicate job check is performed. If a duplicate job is found, an error message is issued. The job is not possible to submit.

When the job is submitted, a record is written to a table that controls the execution of the batch, the Job Control file CJBCTL. The CJBCTL manages the administration of the submitted jobs and controls and monitors the execution on the highest level.

A second table, the job command file CJBCMD holds details about the job, as to what program to execute and other settings. This file controls the detail execution in the batch environment and may hold the settings/parameters for selection of data, job control information, execution information and printing information. Several records may be created for each job in the file CJBCMD. Not all information is needed for every job.

When a job is submitted, batch job manager CMNGJOB is in command and controls the execution.

CMNGJOB tries to start the submitted jobs. To control this process one or several job queues are supplied for execution of the jobs. Each queue has a maximum limit for the number of jobs that are allowed for parallel execution, to avoid overloading the batch processor. This is set in 'Job Queue. Open' (MNS300).

For further information on job queue management, see Manage job queue in this document.

  1. Job and user
  2. Job and user group
  3. Job
  4. User
  5. User group
  6. Blank job and user. (You can add such a record in (MNS310) thus "catching all" jobs that do not match alternatives 1-5.)