Using the precheck option
Use the precheck option explains how to have the system check certain criteria on each object that you save on a library-by-library basis. This option is not required.
You can use the precheck (PRECHK) parameter when you save objects to ensure that all of the objects you intend to save can be successfully saved. If you specify PRECHK(*YES), the system verifies that the following are true of each object that you are saving on a library-by-library basis:
- The object can be allocated during the save operation. No other job has a conflicting lock on the object.
- The object exists.
- The object is not marked as damaged. The precheck process looks only for damage that has already been detected. It does not detect new damage to the object header or damage to the contents.
- All members of an object can be allocated if the object is a database file.
- The person that requests the save operation has sufficient authority to save the object.
When you specify PRECHK(*YES), all of the objects you are saving in a library must meet the conditions. If they do not, no objects in the library are saved. If you specify more than one library on the save command, the failure of one library to meet the PRECHK tests does not typically prevent the system from saving other libraries. However, if you specify SAVACT(*SYNCLIB), the entire save operation stops if one object fails the precheck process.
When you specify PRECHK(*NO), the system performs the checking on an object-by-object basis. The system bypasses any object that does not meet the conditions, but the save operation continues with other objects in the library.
Parent topic:
Before you save anything...Related concepts
Library synchronization