Use of the Date Control Record by the New Day Procedure
The Date Control record controls New Day procedure workflow. The New Day procedure, in turn, updates the Date Control record during various stages of New Day processing.
The main steps of the New Day procedure are
Check the last running date of the New Day procedure (using the CTBCHK internal program).
The first date in the Date Control record (columns 1 through 6) is compared to the current working date (at the time of the run).
If the current working date is the same as the first date in the Date Control record, a message indicates that the New Day procedure has already run today and the condition code is set to 0004.
If the current working date is earlier than the first date of the Date Control record, the New Day procedure stops executing and notifies the user that an attempt was made to run a New Day procedure before its time.
If the current working date is later than the first date of the Date Control record (the normal situation), the first date of the Date Control record (columns 1through 6) is updated to the current working date that is then used by all components of the New Day procedure as the current scheduling date.
If the New Day procedure did not run for more than one day, a warning message is issued and the New Day procedure attempts to schedule balancing missions for all of the days that have passed since the last scheduling date (according to production parameters).
The program "asks" the operator a series of questions regarding the computer’s current date. This ensures that an incorrect date was not inadvertently entered during IPL.
Placing balancing missions in the Active Balancing file according to the current scheduling date and the last running date (using internal program CTBBAO).
Program CTBBAO acts on a user‑defined balancing mission table referenced by DD statement DABAL. The program checks whether each mission in the table must be scheduled on one or all the days that have passed since the last original scheduling date (date‑3 or date‑5) until the current working date (date‑1). If a mission must be scheduled, it is placed in the Active Balancing file.
For example, if a computer did not operate from the 20th to the 23rd, a mission originally scheduled to run on the 20th did not run. Program CTBBAO determines whether the mission must be retroactively scheduled to run on the logical date of the 20th. For more information, see the RETRO parameter in the mission definition parameters chapter of the Control‑M/Analyzer User Guide.
When the program finishes processing the mission definitions, the "finish indicator" dates (date‑3 and date‑5) are updated to the working date calculated by program CTBCHK (date‑1).
Before program CTBBAO starts operating, it compares date‑2 with date‑3 and date‑4 with date‑5. If they are not equal it probably means that a previous run of program CTBBAO has abended. The user is notified and the program terminates. To correct the error, you must edit the Date Control record to the correct date values.
Note: When manually modifying the Date Control record, verify that the same missions are not scheduled to run twice on the same day.
Recording the end of the Daily run (using program CTBPDA).
Program CTBPDA updates the "finish indicator" date (date‑7) by setting it to the value of the current working date (date‑1). This is used to indicate that the New Day procedure finished successfully.
BMC recommends that the CTBJAFDL utility be run as the last step of the New Day procedure. For more information about this utility, see the INCONTROL for z/OS Utilities Guide.