Runtime scenario

This section describes what happens in M3 when a function is run in M3 BE Job Scheduler.

  1. M3 BE Job Scheduler initiates cPXMNS230, which starts (SHS230).

    In (SHS230), a quick check is run to verify if a function should be scheduled. If a scheduled run is needed, (SHS230) is displayed to the user.

  2. When the user has decided on the schedule, CSHHED is updated with relevant information. The program cPXMNS230 then initiates SBMJOB.
  3. In SHS235, a verification of the to-be-scheduled job is performed. After that the program copies the relevant job commands from CJBCMD to CSHLIN.

    When the records are copied to CSHLIN, they are deleted from CJBCMD.

  4. Based on the scheduling, the first time (often the only) run of the function is calculated in SHS235.

    After that, the program CSHCTL gets updated with the schedule information.

  5. To schedule a run at a later time, the job CSCHJOB must be run.

    The CSCHJOB job receive the information from the CSHCTL program on the schedule. If there is no job to run immediately, CSCHJOB job will be delayed for another 15 seconds, when CSHCTL is read again.

    Once a scheduled job is detected, the relevant job commands is copied from CSHLIN to CJBCMD in CSCHJOB. The job initiates QCMDEXC to create records in CJBCTL. In this way, the job is submitted to CMNGJOB as any other submitted job from M3.

    The CSCHJOB job also performs a check to verify if a scheduled job should be run once or if it should be run again, at a later time. If it is a one time schedule, the records in CSHHED, CSHLIN and CSHCTL are deleted. If the job should be run multiple times, information in CSHCTL is updated with the upcoming schedule.

Related topics