Determining objects that are not saved
Determining the objects that are not saved is just as important as determining the objects that the system saved. The system may not save an object for two basic reasons.
- The object is not in your save plan. For example, you save libraries individually. You add a new application with new libraries, but forget to update your save procedures.
- The object is in your save plan, but the system did not successfully save it. The system may not save an object for any of the following reasons:
- It is in use. If you use the save-while-active function, the system waits a certain amount of time to obtain a lock on the object. If you do not use the save-while-active function, the system does not wait.
- The system marked the object as damaged.
- You do not have the necessary authority to the object.
When the system cannot save an object, the system skips that object and writes an entry to the job log. Verifying the job logs that the system creates by your save procedures is very important. If you have very large save operations, you may want to develop a program that copies the job log to a file and analyzes it.
You can specify OUTPUT(*OUTFILE) INFTYPE(*ERR) on the SAVLIB, SAVOBJ, and SAVCHGOBJ commands. This creates an output file that only contains entries for those objects that the system did not save. Refer to the on-line command help for more information about the specific command.
Periodically verify your backup strategy by the following methods:
- Review when the system saves objects.
- Determine when the system saved the changes that were made to these objects.
Use the information in the object description to determine when the system last saved the object. Base your method for doing this according to your save strategy. If you save entire libraries, you can verify the save date for every library on the system. If you save individual objects, you need to verify the save date for objects in all user libraries.
To verify save dates for libraries, you can do the following:
- Create an output file that has information about all the libraries by typing:
DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*LIB) + OUTPUT(*OUTFILE) + OUTFILE(library-name/file-name)- Use a query tool or a program to analyze the output file. The field ODSDAT contains the date that the object was last saved. You can sequence your report by this field or compare this field to some date in the past.
You can use a similar technique to check when the system last saved objects in a specific library.
Parent topic:
Verifying what the system saved