Restarting jobs
Serialization and concurrency between BMC AMI Utilities
To prevent two incompatible utilities from running on the same object concurrently, BMC AMI Utilities use the following mechanisms:
- An internal matrix of utility IDs and processing objects, kept in the checkpoint.
It is often necessary to address a previously failed utility ID before running a utility with a different utility ID on the same object. You can run the previously failed utility with a RESTART or with QUICKEXIT to clean up temporary files. If the utility is in a Must Complete state and you run a QUICKEXIT, the utility simply completes. BMC AMI Utilities ensure that restarting the job causes no damage.Serialization and concurrency between IBM utilities and BMC AMI Reorg
To prevent conflicts between BMC AMI Reorg and any IBM utility, BMC AMI Reorg has the +BEFOREACC(UT) parameter in BMC AMI Reorg to cause that utility to fail if it finds any IBM utility at a key point.
Checkpoint data set
To run, BMC AMI Reorg requires access to a linear VSAM data set named during the installation procedure and configured with the NGTCKPT parameter. This checkpoint data set (NGTCKPT) contains all the restart information for utilities.
The checkpoint data set includes the following information:
- List of objects to be reorganized and their status
- Internal tables required for restart
- List of objects being renamed
- RUNSTATS values
For more information about the checkpoint data set, see Maintaining the BMC AMI Utilities checkpoint data set.
Utility ID considerationsBMC AMI Utilities accepts utility IDs (UID) with up to 16 characters as part of the PARM field on the JCL EXEC statement.
If BMC AMI Utilities determines that an earlier job using the same utility ID as the current job ended prematurely, then the current job proceeds based on the restart parameter that you specify:
- RESTART—(Default) Processing resumes from the most recent successful checkpoint, which is typically the last completed table space or partition.
- For any option specified::
- If your choice is feasible for the utility, processing proceeds as dictated.
- If the restart option is incompatible with the UID state, then processing does not continue.
The key to this process is the utility ID. Note the following considerations:
- BMC AMI Utilities resumes the processing of the original set of objects. If you change the utility control statements before resubmitting the utility, the new statements are ignored.
- Two BMC AMI Utilities steps using the same utility ID in different jobs cannot run concurrently. This can happen when two steps appear in inadvertent duplicates of the same job or in unrelated jobs that use the same utility ID. The second step to begin execution fails.
Automatic cleanup of Utility IDs with BMC AMI Reorg
Using the +CLEANUP(yes/no,rc) parameter allows for objects in error to be cleaned up and the specification of a return code. This prevents the need to display or terminate UIDs after a failure. Typically, reorganizations don’t have to run, so +CLEANUP(YES) specifying a return code that allows the scheduled job to complete is used and the jobs are reviewed when convenient. If a Reorg must execute, like when discarding or materializing pending changes, then specify +CLEANUP(YES,8) to cleanup and prevent the job from completing. After reviewing the error, you have the choice of restarting the step or forcing the job complete to skip processing, either way the UID is not a concern. This has the added benefit in that you can make any changes to the job including the Reorg statement itself.
UIDs in a Must Complete state with BMC AMI Reorg
BMC AMI Reorg can fail with a return code 16 and leave the Utility ID (UID) in a Must Complete state. This usually occurs when the Reorg phase is complete and posted to the Db2 catalog and a failure occurred while writing the copy data set from the utilities internal work file to the users copy data set. This can occur for multiple reasons, primarily if the users copy data set name is invalid or if there was a space allocation issue. The user must refer to the SYSERROR and address the issue and RESTART or QUICKEXIT the utility.
BMC AMI Reorg can also end with an object in a Must Complete state due to errors during the narrow window for fastswitch/rename. In this case, no action is required other than a RESTART or QUICKEXIT of the UID.
BMC AMI Utilities have the following three options for the restart parameter when restarting the UID:
- RESTART – Restart the UID and process any incomplete or failed objects which were not cleaned up, including any object that is in a Must Compete state.
- QUICKEXIT – Back out failed objects and complete any object that are in a Must Complete state.
- NORESTART – You cannot use this option if UID is in a Must Complete state, doing so will produce an error message in SYSERROR.