When a job is submitted, M3 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).
The queue is determined by the job control record in CJBCMD. Jobs without a specific queue assignment are placed in the default queue QBATCH.
The submitted jobs are executed in order of priority. First, all jobs with priority 1 are executed, then all jobs with priority 2, and so on.
Queue A has 100 jobs with priority 1 and 70 jobs with priority 2. Queue B has 50 jobs with priority 1.
The execution order will be:
Queue A, priority 1 (100 jobs)
Queue B, priority 1 (50 jobs)
Queue A, priority 2 (70 jobs)
It is a good idea to create separate queues for different types of jobs, that is, a special queue for jobs with long execution time, another for medium and yet another for quick running jobs. Specific queues can also be assigned for a given group of jobs. Different queues combined with an appropriate limit for maximum number of jobs can be a powerful, albeit simple, way to improve system utilization and availability.
How many jobs that actually can be started are controlled by a maximum jobs setting for each subsystem. These settings are defined in the M3.properties file and M3 Script file.
Maximum number of subsystems that can be started by server (0 - no limit
Should load balancing between M3 Subsystems be used? Value 0= False, 1= True.
How many jobs can be started in a M3 Subsystem at the same time? This property may be used to load balance between different subsystems running in different M3 servers. Value 0= No limit
This setting is not used anymore and must be set to zero.
Settings are instead made in M3 Script file
If 20 jobs are allowed in SUB:B subsystem and three job queues with a maximum of 8,3 and 1 parallel jobs are attached to that subsystem, the load on the subsystem will be a maximum of 8 +3 +1 = 12 jobs.
If 10 jobs are allowed in SUB:B subsystem and three job queues with a maximum of 8,3 and 1 parallel jobs are attached to that subsystem, the load on the subsystem will be a maximum of 8 +3 +1 = 12 jobs. That is 2 more than allowed. Here load balancing between M3 Subsystems can be used, depending on the settings in the M3.properties file.
Follow these steps to prepare a job to be placed in a job queue (in a file) instead of being sent directly to run in batch.
You have to set up and started jobs in the subsystem. For further information, refer to M3 Business Engine Auto Start Job Descriptions.
Define a job queue
Start 'Job Queue. Open' (MNS300). Enter an ID for the job queue.
Open the E panel. Fill in Max active jobs running at the same time in this job queue.
Place a job in job queue
Start 'Job. Connect Job Queue' (MNS310). Fill in a job in the Job field. The User/group field indicates the control of the start of the database job. A blank user indicates all users.
Open the E panel. Select the job queue in which this job should be placed. Select a priority for the job.
Select if you want the user to confirm job start or not and the type of confirmation to be used. Select if the job history should be saved in the job history file. The saved jobs are displayed in (MNS320). Click Next.